You need to sign in to do that
Don't have an account?
Enry
Structure and fuction for picklist's values
I'm tring to optimize the code below.
I'm looking for a structure where i can put the picklist's values and after (with just a condition) i want check the condition for all the values in the structure.
if ((lead.Status.trim()=='Archived' || lead.Status.trim()=='False'||lead.Status.trim()=='Lead - Never'))
should be like this:
structure=['Archived','False','Lead - Never'];
if ((lead.Status.trim()==structure))
I can not find anything, do you know how i can do this?
Thanks in advantage for any advice.
Br
You can store your values in a Set, and check if your set contains required value.