Dynamics CRM 2011 · Javascript

CRM 2011 – Set Customer Lookup Field’s View using Javascript

To set Customer Lookup Field’s Lookup View using Javascript:

document.getElementById("customerid").setAttribute("defaulttype", "1"); // 1 = Account, 2 = Contact
Xrm.Page.getControl("customerid").setDefaultView("2E568AB3-A2C7-E011-A662-005056A10003"); // GUID from the pre-defined View for Account

Cheers,
Sy

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s