Default Regarding Lookup to Incident in CRM 2011 in Email and Phone Call

Default Regarding Lookup to Incident in CRM 2011 in Email and Phone Call

Use the following code to set the Regarding Lookup to Incident instead of all party list types.

document.getElementById(“regardingobjectid”).setAttribute(“defaulttype”, “112”);

(or)

crmForm.all.regardingobjectid.setAttribute(“defaulttype”, “112”);

you may use either type of codes . . Working fine.

if you disable all the types and show the only one entity type use the following code on page load

document.getElementById(“regardingobjectid”).setAttribute(“defaulttype”, “112”);
document.getElementById(“regardingobjectid”).setAttribute(“lookuptypes”, “112”);
document.getElementById(“regardingobjectid”).setAttribute(“lookuptypeIcons”, “/_imgs/ico_18_112.gif”);

or

using CRM Form Code is as Follows

crmForm.all.to.setAttribute("defaulttype", "112");
crmForm.all.to.setAttribute("lookuptypes", "112");
crmForm.all.to.setAttribute("lookuptypeIcons", "/_imgs/ico_18_112.gif");

You may achieve same functionality using JQuery is as follows and refer to page JQuery 1.4.1 and json2 files in your Form Properties

$("#regardingobjectid").attr("defaulttype", "112");
    $("#regardingobjectid").attr("lookuptypes", "112");
    $("#regardingobjectid").attr("lookuptypeIcons", "/_imgs/ico_18_112.gif");

Cheers,

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