javascriptdynamics-crmdynamics-crm-onlinedynamics-crm-2015

How to access the <div> element / DOM object from the dynamics CRM form 2016


I need to change the background colour of the CRM form notification element in the CRM dynamics 2016 for trial purposes. I know it's unsupported but this is for end user trial. the div element details are as follows-

<div class="Notifications Notifications-strict Notifications-strict-bottom" id="crmNotifications" style="height:; display: block;" size="3" maxheight="51">

I've tried using the window.parent.getElementById('crmNotifications').style.backgroundColor;

but with no luck. i've also heard that DOM element is not accessible from the entity form. is there a way i can change the background color.


Solution

  • document.getElementById("crmNotifications").style.backgroundColor = "blue"