protected override ListFieldItemCollection UpdateDataSourceSettings(Item item) { Assert.ArgumentNotNull(item, nameof(item)); var listFieldItemCollection = new ListFieldItemCollection(); listFieldItemCollection.AddRange(Items); DataSourceSettingsManager.SaveSettings(item, listFieldItemCollection); return(listFieldItemCollection); }
protected IEnumerable <ListFieldItem> GetSalesforceItems(string defaultSelection) { // Add some logic here to call a service that gets data from Salesforce and converts it to a ListFieldItemCollection var items = new ListFieldItemCollection(); items.AddRange(new ListFieldItem[] { new ListFieldItem { Value = "Salesforce Value 1", Text = "Salesforce Item 1" }, new ListFieldItem { Value = "Salesforce Value 1", Text = "Salesforce Item 2" }, new ListFieldItem { Value = "Salesforce Value 1", Text = "Salesforce Item 3" }, new ListFieldItem { Value = "Salesforce Value 1", Text = "Salesforce Item 4" } }); return(items); }