I have a contact lookup so when i click on the lookup it opens a popup and i search for a particular contact. what i want is to restrict the result to display only contacts related to a account, for example in my case object i have account field i also have contact field when i click on the lookup of contact it should only show the contacts of the account. Do any body have any idea to do this. Please help me.
-
salesforce.stackexchange.com/questions/7494/… You may like to refer this link– Mohith ShrivastavaFeb 7, 2013 at 7:21
-
thanks that was nice but works only when we insert record through the object directly. Can you guide me how to do it through code. because i am trying to insert record from a VF page– AnuRajFeb 7, 2013 at 7:46
2 Answers
You can accomplish this using the Filtered Lookup feature.
-
thanks that was nice but works only when we insert record through the object directly. Can you guide me how to do it through code. because i am trying to insert record from a VF page.– AnuRajFeb 7, 2013 at 7:46
http://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/
If you are using visualforce page for this one workaround is to roll your own salesforce lookup popup window .
The above blog has tips and tricks on how to achieve this
-
is the filters only work on a standard page, if we are using the field as apex:inputfield wouldnt the filter work like in standard page– AnuRajFeb 7, 2013 at 8:21
-
Filters i personally have tried but with no luck.You can try though .Sometimes i used to get field "filter Validation Exception".let me also know if you are able to work for visualforce with filters Feb 7, 2013 at 8:23