/
Retrieving Multipicklist Field Values
Retrieving Multipicklist Field Values
You can get the list of all available values (options) using the code below. Note the values enum is generated only for picklist type, not for the multi picklist type.
/// <summary> /// Return the multi select options from an objects schema /// </summary> public void GetMulitSelectPicklistValues() { SalesforceSession salesforceSession = SessionTest.GetActiveSession(); AccountService accountService = new AccountService(salesforceSession); FieldService accountFieldService = FieldService.Instance(Account.SFType, salesforceSession); // use a string to retrieve the list SalesforceField multiSelectList = accountFieldService.FieldFromObject("S4S__Multi_Select_List__c"); // or use the object attributes to retrieve the list SalesforceField ratingField = accountFieldService.FieldFromObject(Account.Fields.Rating); foreach (PicklistEntry picklistEntry in multiSelectList.picklistValues) { System.Diagnostics.Debug.WriteLine(picklistEntry.label); } }
Related content
Create Multiple Records in Salesforce with One API Call
Create Multiple Records in Salesforce with One API Call
Read with this
Retrieving Picklist Values
Retrieving Picklist Values
More like this
S4S Code Examples
S4S Code Examples
Read with this
Handling Custom Picklists
Handling Custom Picklists
More like this
Multi select picklists
Multi select picklists
More like this
Configuring the Role Provider Account Lookup
Configuring the Role Provider Account Lookup
More like this