function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Internal PartnerInternal Partner 

Unable to filter Name lookup field on Task in order to show Contacts to the account on an Opportunity record

Hi all,

Saying you are on an Opportunity record. The account is "Acme". You want to create a task on the Opportunity. On the Task there is the Name field (type lookup) which shows all Contacts no matter if they belong or don't to the Opportunity account.

I know there is no possibility to add a lookup filter to the Name field in order to show only the Contacts to the Opportunity account.

Is there any workaround this can be made in Salesforce? Lightning component? Visualforce?

I would appreciate your responses.
Murali MattaMurali Matta
Hi Partner,

I hope below links can help you to override the standard lookup functionality.

https://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/ 

https://salesforce.stackexchange.com/questions/40556/how-to-override-lookup-icon-in-standard-page-layout

http://bobbuzzard.blogspot.com/2010/09/visualforce-lookup.html


Let me know if you have any confusion..

Kindly mark this as solved if the reply was helpful.

Thanks,
Murali