Solved

Need Filtered Lookup

Posted on 2010-08-26
6
867 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
  • 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Read about achieving the basic levels of HRIS security in the workplace.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 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