+ Start a Discussion
otbuildotbuild 

Lookup filter on Contact Name field on Quote

Need to add filter on Contact Name Lookup field on Quote to display only those Contacts linked to the Account. At present, Contact lookup on Quote shows all the Contacts. I tried to add Lookup Filter on Contact Name field but not able to add desired filter. Please suggest.

Navatar_DbSupNavatar_DbSup

Hi,

 

If you want to add the filter criteria on contact name field present in quote object.

 Follow the below steps

  1. Your name->setup->Customize->Quotes->fields
  2.  Click on Edit link present in front of contactName field
  3. Click on Show Filter Settings link
  4.  If you want to set the filter criteria on the basis on contact fields select the ContactName from the current lookup and add filter criteria on the basis on contact field

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

 

 

 

 

 

 

 

 

otbuildotbuild

Thank you for replying on my post. The problem is I don't see any field on Quote which I can map to Contact Name: Account ID to filter Contacts in Lookup. I'm not able to select Quote->Opportunity->AccountID.

Navatar_DbSupNavatar_DbSup

Hi,


I think you cannot filter the contact on the basis of Quote->Opportunity->AccountID criteria. But you can filter the contact on the basis on contact->accountid .

 

if you want to display that contact only that is associated with any account
Try the below filter criteria:
Contact Name: Account Name IDNOT EQUAL TO

otbuildotbuild

Yes, we can filter Contacts on the basis of Account ID, but not able to understand how do I get the Account ID on the Opportunity for which Quote is being created. We with to display only those Contacts on Quote which are linked to the Account for which Quote is being created.

KoenVMKoenVM

Hi, did you ever get a solution for this? I have the same problem.

JacquelineLeeJacquelineLee

Has anyone solved for this problem?

 

I cannot create a lookup filter on a Quote-> Contact field to only contain those contacts associated to the Account.

 

Please advise~

PrabhaPrabha
Here is the solution that worked for me.... It is not straight though..

initially we wanted to have a validation rule but it is not the user friendly.. so thought of this one.
  1. created another account lookup field on quote.
  2. we could then use this filter on contact filter rule.
  3.   User-added image
  4. created a new button on related list, this post can help you... http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html
  5. then, we had it. :)
joel500joel500
@prabha, would you be able to post the URL of your button?  can't figure out how to add reference to new field.  
Amit S 14Amit S 14
@Joel, I am having a similar request to filter Contact's lookup to show only the Contacts's associated with the related Account. were you able to resolve your requirement? pls help me with the filter conditions and button URL
PrabhaPrabha
Ok, Here it is:
/0Q0/e?CF00N9000000EPGZN={!Opportunity.Account}&oppid={!Opportunity.Id}

Please note that the string 'CF00N9000000EPGZN' is made up  'CF'+custom lookup field Id '00N9000000EPGZN' . 

And now, We can have this button on opportunity header as well, we then changed the location of that button to opportunity detail and that is working just fine.

User-added image

And the rest stay same.
Amit S 14Amit S 14
Thanks Prabha, Had figured it out.

Was working on the Button placement. True I am facing the same issue of New List Button being visible on the Opportunity Header. Will convert it to Detail Page Button and resolve.
joel500joel500
@prabha: Thank you again. I don't know how I was over-complicating this, but it's working now.  

Is it expected that the filter will only work if visible on the Page Layout?  Any recommendations on how to hide the field but for it to still control the Contact lookup filter?  
PrabhaPrabha
Well, No other way... These are called URL hacks and temporory solutions, Ideally we should write a VF or lightning component to do that.
To answer ur question, We need to have the field on the layout to make the filter work.
joel500joel500
@prabha: And so it will be. Thanks!