You need to sign in to do that
Don't have an account?
JeffStevens
Looping through multi-select picklist values
Could I get simple example of how to loop through a multi-select picklist field?
Thanks!
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Could I get simple example of how to loop through a multi-select picklist field?
Thanks!
Which are you trying to do:
1. Loop through the values selected
Account a = [Select AMSPICKLIST__c From account Limit 1];
String[] tmpString = a.AMSPICKLIST__c.split(';');
For(Stirng s : tmpString)
system.debug(s);
2. Loop through the available options to select from?
Then to loop through it:
For(SelectOption so : RESULTS)
system.debug(so.value());
Account accountRecord = [select id, name, Cars__c from Account where name = 'Microsoft India'];
String[] carsOwned = accountRecord.Cars__c.split(';');
System.debug('Cars owned by this account are ' + carsOwned);