custom dependent picklist

Custom Dependent Picklist Field With lightning:select In Lightning Component

Lightning Component

Hey guys, today in this post we are going to create a new updated version of Custom Dependent Picklist fields using ‘lightning:select‘ base component in salesforce.

custom-dependent-picklist lightning

Prerequisites : basic understanding of Lightning Component & apex Programming
Step  0 : Setup Picklist field dependency

In this post , first we have create 2 custom picklist fields on salesforce  standard Contact object

Country__c &  City__c

then set field dependency. here country is the controller field  and city is the dependent field.

Custom dependent picklist salesforce sfdcmonkey

Step  1 : Create apex controller

  • you don’t need to change anything in above apex classes.
Step  2 : Create Lightning Component


Check also :  Custom Multi-Select Picklist In Lightning Component With Select2 jQuery Plugin


  • check above code comments.
  • You just need to change the object API Name/Type on line number 15.[DependentPicklist.cmp].
  • And change dependent field and controller field API Names on line number 16 – 17.[DependentPicklist.cmp].

want to create 3 level picklist field dependency ? check example here 

Like our facebook page for new post updates.? & Don’t forget to bookmark this site for your future reference.

 Let us know if it helps you 🙂

people also check : How to use SVG in Salesforce Lightning Component ?


(Visited 11,867 times, 38 visits today)


Leave a Reply