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

Look Up Record Default Entity Scripts Not Working in CRM 2013

$
0
0

Hello all,

I can't seem to get the scripts in my email activtity form to work in CRM 2013. I have the following functions in my OnLoad event for the email activity form:

function DefaultToLookUp()
{
document.getElementById('to').setAttribute('defaulttype', '2');
Xrm.Page.getControl('to').setDefaultView('A2D479C5-53E3-4C69-ADDD-802327E67A0D');
}

function DefaultRegardingLookUp()
{
document.getElementById('regardingobjectid').setAttribute('defaulttype', '3');
Xrm.Page.getControl('regardingobjectid').setDefaultView('9EB361B4-67AC-4830-8ABF-2D29EFBAEE2C');
}

These used to set the default entity to contact for the "To" field and opportunity for the "Regarding"field in CRM 2011. Your assistance is appreciated!


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>