Reputation: 216
The following code helps me to set the Customer Lookup to Contact instead of Account.
document.getElementById("customerid").setAttribute("defaulttype", "2");
It is so in IE, but how can I do this for Chrome? Thanks!!!
Upvotes: 1
Views: 367
Reputation: 17552
I'm assuming you are on Polaris here for the multi browser support.
That isn't supported JavaScript, so I wouldn't expect it to work in Chrome. As far as I know there is currently no supported way to set the lookup to default to a particular entity (though I would be very pleased to be proved wrong here).
I only supported JavaScript functions are in the Xrm.Page API.
Relevant article: Use JavaScript with Microsoft Dynamics CRM - Write JavaScript for Multiple Browsers.
Upvotes: 3