You need to sign in to do that
Don't have an account?
Rajashri
How to retrieve and split the values of multiselect picklist
Hi,
I have custom object in Salesforce name 'Project' and It has a Picklist Field 'Proj Implementation' Type.
and my second custom object is name 'SEC' and it has picklist(Multiselect) field name 'SEC DD'.
I want to compare if value of 'Proj Implementatuon Type' equals to 'SEC DD' then add some records.
How can i do this comparison?
also How to retrieve and split the values of multiselect picklist to achieve the result?
Can anyone plz send me code?
Thanks
Rajashri
Is 'Proj Implementation' field a picklist or multipicklist? If it is a picklist, then you are essentially checking if SEC DD contains the value of Proj Implementation. You can do this using the contains function of String Eg. Boolean res = String1.contains(string2).
For splitting multipicklist value, you can use the split function of String. Eg: String[] picklistValues = Sec_DD_String.split(';');