How to prepare Dependent Picklist using Javascript for External Objects?

  • 1
  • Question
  • Updated 3 years ago
I want to prepare Custom dependent pick-list using JavaScript for external many to many relationship objects.

Let say , "Sample" and "Sample 2" are two objects. "Sample Junction " is a junction object.

Here There is custom pick-list which have "sample" objects ids.

Based on selection of "Sample" object id, i want to prepare pick-list which have "Sample 2" records values. means it has to check the values in junction object.


How to achieve this?
Photo of Goutham J

Goutham J

  • 568 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Look into the "Filters" function of the reference field.  There you can add a filter of Sample 2 records that are included in the reference field,  based on whether they also have 'Sample' in thier row of the junction object. 
Photo of Goutham J

Goutham J

  • 568 Points 500 badge 2x thumb
Can I get a example on using the 'Filters' function? I have one more quick question, lets say that I can have an 'id' from a snippet. Can I use(reference) this 'id' in a different snippet?