Monday, July 25, 2011

To hide a "Add existing record" button from an associated view in an iframe in a CRM form.

I have tried Daves method to hide the associated view button, somehow it did not work for me, after trying various solution this one worked for me.
To hide a "Add existing record" button from an associated view in an iframe in a CRM form.

if(crmForm.all.IFRAME_new1)
{
crmForm.all.IFRAME_new1.onreadystatechange = function()
{
if (crmForm.all.IFRAME_new1.readyState == 'complete')
{
var addExistingBtn = crmForm.all.IFRAME_new1.contentWindow.document.getElementById('_MBtoplocAssocOneToMany10040travelbudgetdestination');
crmForm.all.IFRAME_new1.contentWindow.document.getElementById('_MBtoplocAssocOneToMany10040travelbudgetdestination').style.display = 'none';
}
}
}

No comments:

Post a Comment