Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

set default value for TO field in dynamics 365

$
0
0

Hi,

I tried to set the default value in To field of the email entity with the below custom JS code but received the error "isdisabled' filed does not exits for account entity.

function preFilterLookup() {   

Xrm.Page.getControl("to").addPreSearch(function () {

   addLookupFilter();

 });

}

function addLookupFilter() {

fetchXml = "<filter type='and'><condition attribute='isdisabled' operator='eq' uitype='systemuser' value='0' /></filter>";

document.getElementById("to_i").setAttribute("defaulttype", "8");

   document.getElementById("to_i").setAttribute("lookuptypes", "8");

   document.getElementById("to_i").setAttribute("lookuptypeIcons", "/_imgs/ico_16_8.gif");

document.getElementById("to_i").disableViewPicker = 1;

Xrm.Page.getControl("to").addCustomFilter(fetchXml);

}

Please let me know the same for dynamics 365


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images