Solved

Need Filtered Lookup

Posted on 2010-08-26
6
874 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
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
Messaging apps are amazing tools with the power to do a lot of good, but the truth is the process of collaborating with coworkers requires relationships established through meaningful communication - the kind of communication that only happens face-…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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