CRM2011 – Default Regarding Lookup to PhoneCall in Activities Entity

Today I need to change the default View in my Regarding Lookup in the Task Entity.
I used the following code to set the Regarding Lookup to Phone Call and set the default view.

document.getElementById("regardingobjectid").setAttribute("defaulttype", "4210");
Xrm.Page.getControl("regardingobjectid").setDefaultView("a2d689d1-45a3-4c29-aswsd-802327e67a0d");

With the first line we set the default entity type to Phone Call for the Regarding Lookup dialog. In the second line we set the Regarding Lookup dialog’s view to the ‘Phone Call Lookup View’ using its guid value.

If you do not use this line of code it will default to the ‘My Active Phone Call View’ or whatever you have selected as the default Phone Call view.

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...