Suppose we have two custom junction objects which link two Accounts via lookups.
Lets call them Looky1__c and Looky2__c.
We have a requirement to restrict the accounts selectable in Looky2__c based on existing relations described by Looky1__c.
Eg "Barnum Ltd" is linked to "Chesop Inc" via an instance Looky1__c. "Barnum Ltd" is also linked to "Waldon Plc" via another instance of Looky1__c.
When creating a new Looky2__c instance from "Barnum Ltd" the account list for the other end of the link is restricted to "Chesop Inc" and "Waldon Plc". That is, limited to its siblings.
Ideally I'd like this to appear just as simple filter options work; When a user clicks the magnifier lookup icon a filtered search list appears.
Is there a way to do this?