You need to sign in to do that
Don't have an account?
SF-dev
How to populate Dependent PickList value in Apex Class/ Trigger
I need to populate some picklist value on an Opportunity Trigger.
There are two pickList : 'PickList 1' and 'PickList2' . 2nd one is dependent on the earlier.When I populate PickList1 on the trigger, how can I get the relevent value of 'PickList2' ?
Any help will be appreciated . Thanks in Advance!
You have to use IF statements on PickList1 and hardcode the Picklist2 values in your code. If there is a one-to-one correspondence between Picklist1 and Picklist2, you could instead set up a lookup table using Custom Settings and create a Map from that.