You need to sign in to do that
Don't have an account?
Wycado
Opportunity Contact Roles Filtering
I would like to modify the filters on the standard Contact Lookup field on Opportunity Contact Roles to filter on the following:
1. Present only Contacts associated with the Account related to the Opportunity (standard function)
2. Present only Contacts associated the the "Contact Roles" standard related list on the Account related to the Opportunity (custom function)
3. Present only Contacts associated with the Account shown in a custom Opportunity lookup field. This is not the Account related to the Opportunity, but a different Account
Contact that met any of these criterion would be the only ones shown in the "Contact Role" lookup on the Opportunity record.
Can the Apex in the standard Opportunity Contact Roles be accessed and modified to do this?
1. Present only Contacts associated with the Account related to the Opportunity (standard function)
2. Present only Contacts associated the the "Contact Roles" standard related list on the Account related to the Opportunity (custom function)
3. Present only Contacts associated with the Account shown in a custom Opportunity lookup field. This is not the Account related to the Opportunity, but a different Account
Contact that met any of these criterion would be the only ones shown in the "Contact Role" lookup on the Opportunity record.
Can the Apex in the standard Opportunity Contact Roles be accessed and modified to do this?
However, you can remove this related list from page layout and add section with custom Visual Force page
You can create a field on VF which gets a list of all the contacts that fall under your criteria.
check the following blog to get sample code:
http://thysmichels.com/2013/01/31/visualforce-lookup-field/