You need to sign in to do that
Don't have an account?

filtering picklist values of field A based on picklist value selected in picklist B
Hello All,
I have Picklist Field A with 16 values and picklist field B with 2 values(Mail/Email). Few values in Picklist A should have both email and mail so that user can select one. Few should have only one either mail/Email. This is in lightning.
Please let me know the ways to do it.
Thank you for your help.
I have Picklist Field A with 16 values and picklist field B with 2 values(Mail/Email). Few values in Picklist A should have both email and mail so that user can select one. Few should have only one either mail/Email. This is in lightning.
Please let me know the ways to do it.
Thank you for your help.
There is a very easy solution to this. If you already have the two picklists created, go to object manager and select the object with the picklists. Then click on Field & Relationships. On the top right, next to new, you will see a button called Field Dependencies. Click on it. Then click on new. Choose Picklist Field A as the Controlling Field and Picklist Field B as the Dependent Field. Then press continue. Then you will go to a new screen where you will have all the values for Picklist Field A as the columns and Mail and email under them. Go through the table and click on Mail/Email and select whether to include values or exclude values. Then click save and you should be all set.
Hope this helps!
I want this on a lightning component. The dependent picklist option is not working here. Thank you.
I suggest you look at the below forum post:
https://developer.salesforce.com/forums/?id=9060G0000005pt3QAA
The sfdc link that is posted is very good and a great base to solve your question.
Here is very good explanation for this issue.
http://sfdcmonkey.com/2018/08/31/dependent-picklist-lightningselect-lightning-salesforce/
Thanks,
Kamesh