Hi,
I have implemented colour background for a field( I know it is not supported), below is what i have written for Form on-load, it is working as expected however, i am thrown with two consecutive script error on loading the form, please help me in rectifying these:
Also we are d365 on-premise, with this code i didn't have to turn on the legacy rendering to Yes, if i do so the code doesn't work, however the errors will disappear but that was the point without turning on the legacy i wanted the code which i have now but cant get rid of errors.
The code i have written:
function Setcolour() {
var a = Xrm.Page.getAttribute("jmfloc_vulnerable").getValue();
if(a == 1)
{
window.parent.document.getElementById("jmfloc_vulnerable").style.backgroundColor = "#cc382d" ;
}
}
Errors thrown:
Thanks,
PS