Change the default entity in Lookup Window
For instance, in Opportunity form of Microsoft CRM if you want to change the “Potential Customer” field’s default entity from Account to Contact. You need to use the following piece of code in onLoad event of the Opportunity Form.
Remember to enable the event and then save and publish the opportunity entity.
Following are codes of basic entities of Microsoft CRM 3 ;
if ( crmForm.all.customerid != null )
{
crmForm.all.customerid .setAttribute(”defaulttype”, “2″);
}
{
crmForm.all.customerid .setAttribute(”defaulttype”, “2″);
}
Remember to enable the event and then save and publish the opportunity entity.
Following are codes of basic entities of Microsoft CRM 3 ;
- Account 1
- Contact 2
- Lead 4
Thanks to Umar for pointing out this.
Happy Coding...
Labels: crm, crm 4.0, customizations, dynamics, javascript, js, microsoft
Post a Comment