Solved

Need Filtered Lookup

Posted on 2010-08-26
6
870 Views
Last Modified: 2013-11-24
I need to lock down the pop up box that appears when I click Customers on the Order form.  A pop up box appears with a drop down box for Accounts or Contacts.  The default is Accounts (which is what I want).  I want to lock down the drop down list on the popup box so that only Accounts appear (no option for Contacts)

The url that appears is for the pop up box is:
https://apollo7.space.net//_controls/lookup/lookupsingle.aspx?class=BasicCustomer&objecttypes=1,2&browse=0&ShowNewButton=1&ShowPropButton=1&DefaultType=0

I copied this url into a new browser window and discovered that if I change 'BasicCustomer&objecttypes=1,2' to BasicCustomer&objecttypes=1, then I only show Accounts.  

(Note: If I change it to BasicCustomer&objecttypes=2, then I only see Contacts)

Is there a way to modify/filter lookupsingle.aspx (just for Orders) so that it will only show Accounts in the drop down list?

Thanks
0
Comment
Question by:apollo7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 33535308
Hi apollo7,
I would not suggest to modify the .aspx file. Rather than that onLoad event of case you can change the filtered lookup.
What I suggest is to write a JavaScript that will change the URL as per your requirements i.e. a script that can set objecttypes=1
Regards,
Chinmay

0
 
LVL 1

Author Comment

by:apollo7
ID: 33536669
Chinmay - I think I have some examples of this / I will try one and post any questions and errors.
0
 
LVL 1

Author Comment

by:apollo7
ID: 33653467
Chinmay - thought I had some examples of this but cannot find them. Can you provide a link or example of  how to restrict the Customers lookup on the Order form.  The lookup shows both Accounts and Contacts..I want to show only Accounts as a lookup option.

Thanks
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 500 total points
ID: 33655843
Hi apollo7,
On form load event, write this statement : 
crmForm.customerid.lookuptypes = 1;
Regards,
Chinmay

0
 
LVL 1

Author Closing Comment

by:apollo7
ID: 33665503
Thanks Chinmay, works great and I can see other places I can use this method
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 33667641
You are welcome. :) 
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: You must have administrative privileges in order to configure lead or case queues. Salesforce.com (http://www.Salesforce.com) is a cloud-based customer relationship management (CRM) system. It is widely used around the world by sales and ma…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question