Answered by:
Question Regarding Customizing 'Potential Customer' Account/Contact Composite Entity

Question
-
I am well aware this is rather a unique system entity in CRM 4.0 and can not be customized but I was wondering if I can change it's default behaviour. When clicking the lookup attribute on the opportunity, case, etc. the default is always the Account, and in order to pick a Contact, the user needs to switch to Contacts. I have a project where the Contact entity is the primary one, and in most cases, users will pick a contact rather than an Account and I was wondering if it is possible to modify the behaviour so that the Contact will show up first.
ThanksMonday, July 20, 2009 6:26 PM
Answers
-
Hi,
Well, when you click on the lookup, you can get it's URL from the status bar below. If you've noticed the URL carefully, the ObjectType parameter = 1,2 which means Account and Contact. You can attach an event with the click of the Lookup button and open a customized URL which will be the same as the one mentioned in the Status Bar and change the object type to 2,1. This will first show up allthe contacts by default. The URL on the CRM's lookup status bar is given below for reference.
http://localhost:5555/<OrganizationName>/_controls/lookup/lookupsingle.aspx?class=BasicCustomer&objecttypes=1,2&browse=0
Let me also mention that this is an un-supported customization. There are plenty on JavaScript code online to tweak and attachEvents.
I hope this helps you achieve what you want!!
Best Regards,
Gagandeep Singh
http://mscrmnovice.blogspot.com- Marked as answer by Jim Glass Jr Monday, July 20, 2009 7:25 PM
Monday, July 20, 2009 6:56 PM
All replies
-
Hi,
Well, when you click on the lookup, you can get it's URL from the status bar below. If you've noticed the URL carefully, the ObjectType parameter = 1,2 which means Account and Contact. You can attach an event with the click of the Lookup button and open a customized URL which will be the same as the one mentioned in the Status Bar and change the object type to 2,1. This will first show up allthe contacts by default. The URL on the CRM's lookup status bar is given below for reference.
http://localhost:5555/<OrganizationName>/_controls/lookup/lookupsingle.aspx?class=BasicCustomer&objecttypes=1,2&browse=0
Let me also mention that this is an un-supported customization. There are plenty on JavaScript code online to tweak and attachEvents.
I hope this helps you achieve what you want!!
Best Regards,
Gagandeep Singh
http://mscrmnovice.blogspot.com- Marked as answer by Jim Glass Jr Monday, July 20, 2009 7:25 PM
Monday, July 20, 2009 6:56 PM -
Thank you.
It will help me achive what I want but at the same time, I am trying to stay away from un-supported customization so... not quite sure how to implement this.Monday, July 20, 2009 7:31 PM -
Hi,
Alternatively, if you know the first few letters of the contact name, you might directly enter it into the Lookup field without clicking on the Lookup button and let CRM automatically resolve the Lookup value for you. This will save you time.
> You'll avoid opening the Lookup window.
> You'll avoid selecting the Contact from the drop-down list &
> You'll avoid spending time on searching the list of contacts in the Lookup window.
This is a 100% supported solution. :)
[If saving time is your intention!]
Best Regards,
Gagandeep Singh
http://mscrmnovice.blogspot.comMonday, July 20, 2009 8:28 PM -
Try this on the form's OnLoad:
if (crmForm.all.regardingobjectid != null) { crmForm.all.regardingobjectid.setAttribute("defaulttype", "2"); }
Adjust the type as required.Leon Tribe
Want to hear me talk about all things CRM? Check out my blog
http://leontribe.blogspot.com/or hear me tweet @leontribe
Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe- Proposed as answer by Leon TribeMVP Monday, July 20, 2009 9:02 PM
Monday, July 20, 2009 9:02 PM -
Leon,
I added your script as-is to the opportunity OnLoad event regardless of "defaulttype", "2"); or "defaulttype", "1"); it still shows Account.
Am I missing something (I am not a developer).
ThanksTuesday, July 21, 2009 12:23 AM -
Indeed,
This is a great feature of CRM and can save time yet, I am looking for customizing the default lookup.
ThanksTuesday, July 21, 2009 12:24 AM -
If there is no value set in the regarding lookup, the script should set the default entity called on lookup. This is not the behaviour you're seeing?Leon Tribe
Want to hear me talk about all things CRM? Check out my blog
http://leontribe.blogspot.com/or hear me tweet @leontribe
Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe- Proposed as answer by Leon TribeMVP Tuesday, July 21, 2009 11:09 AM
Tuesday, July 21, 2009 11:09 AM -
Nope, actualy I haven't noticed anything different with the script...
Tuesday, July 21, 2009 6:52 PM -
Things to check:The script is referring to the regardingobjectid lookup attribute. Make sure this is right.Make sure the script is enabled on the tickbox where you type it into CRM.Leon Tribe
Want to hear me talk about all things CRM? Check out my blog
http://leontribe.blogspot.com/or hear me tweet @leontribe
Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe- Proposed as answer by Leon TribeMVP Tuesday, July 21, 2009 9:56 PM
Tuesday, July 21, 2009 9:55 PM -
Got it and of course it works, thanks!
btw, is it also possible to restrict it to only one entity? for example regardingobkectid will only show 1 entity?Wednesday, July 22, 2009 5:04 PM -
That I don't know as I'm not much of a coder. Hopefully someone else will.Leon Tribe
Want to hear me talk about all things CRM? Check out my blog
http://leontribe.blogspot.com/or hear me tweet @leontribe
Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribeThursday, July 23, 2009 8:15 PM