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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,963 Most Valuable Professional
nmaenpaa 101,156