Annoyingly, a drawbacks of Microsoft CRM is that it involves allot of lookups. The lookups are good, but the performance, especially across the internet can be disappointing. Each lookup is a request to the underlying database and therefore another packet of information that needs to be passed back and forth. So, the answer is to set the default values for as many look up fields as it is possible to do.
When it comes to creating a new email, there are no defaults for the To, BCC or Regarding fields. What's worse is that their lookups dont even make sense. When you click 'search' under To, the search box defaults to Account and the same is true for BCC and Regarding. Consequently, each of these fields requires at least two clicks to populate. It would make far more sense if the To field defaulted to Contacts, the BCC defaulted to User and the Regarding field defaulted to Case.
Well, the good news is that it is obscenely easy to make this happen and not just for emails, but almost all lookup fields. First of all, we need a little information.
Finding the Object Type Code
In order to tell the Form to use particular default types in the lookup we need to find the Object Type Code. This can be found by typing the following into a browser :
http://<yourservername>/sdk/list.aspx
You should get the following :
Once you have the SDK Metadata list, you should click on the Entity of your choice, in this case Contacts :
Right at the top of the screen, if you look at Object Type Code, you will see the number 2. This is the Type Code that you need for the next step. Go ahead and do the same for Cases (Incidents) and Users and you should get the following values :
Incident = 112
User = 8
Contact = 2
Customising the default type code for Email
Now that you have the Object Type Codes for each entity, you can make the Email form show these entities as the default value for the lookups.
Go To Settings --> Customization --> Customize Entities
Choose Email
Go To 'Forms and Views'
Open up the Main Form
Go to the Onload Event of the Form
Paste the following code into the Onload Event
crmForm.all.regardingobjectid.defaulttype = "112"; //case
crmForm.all.to.defaulttype = "2"; //contact
crmForm.all.bcc.defaulttype = "8"; //user
Click Ok, Save and Close and then Publish the form
Voila! Now when you click the 'To' field in a new Email, the lookup will show contacts in the list, likewise, the 'BCC' field will show Users and the 'Regarding' field will show Cases.
You can do this for almost any form. Happy customising.
Recent Comments