[SalesForce] Lookup Filter with related fields that are more than one relationship away from the lookup object

enter image description here

I want to add a lookup filter for the lookup between Package Version and Release. So I just can choose Releases which are linked to the same Program as my related Package.

This is not possible according to this document:

You can only choose related fields that are one relationship away from
the lookup object.

I want to bypass this issue with a formula field, but the problem here is the missing possibility to compare a text field with lookup field within lookup filters(documentation).

How can I tackle this?

Best Answer

Try this

  1. Create a formula field on package version object and which gets the program value for the related Package record. Something like this

    Package__r.Program__c

  2. Create another formula field on Release object to get the related Program value.

    Program__c

  3. Create a lookup filter to match both of these values.

Select field in the Value/Field section of the filter editor and it will let you to compare with Version record.

Hope this helps !!

Related Topic