AnsweredAssumed Answered

How to filter popup search to present only related records?

Question asked by Asaf Army on Dec 1, 2014
Latest reply on Dec 10, 2014 by Asaf Army
I created a "Warehouse" (basic) module that represets the accounts warehouses.
an account can have many warehouses and a warehouse can be used by many accounts (many-to-many relationship).
a contact can work in one warehouse only and in a warehouse many contacts can work.(one-to-many).

when i choose the warehouse in the contact editview, how can create a filter that only the contact's account warehouses will show in the popup and not all warehouses?

for example: 
TechNow account is related to Warehouse1 only.
How can i show only Warehouse1, in the select popup, when i select the related Warehouse in the contact editview?
i want to choose a warehouse for the contact, but only from the contact account warehouses.



using community edition 6.5.13 and i know how to code sugar, in case the solution demands code changes.

Outcomes