Hello all,
I am looking to write a javascript to change the color of any text field in CRM
Here is my javascript:
function ChangeBackgroundColor()
{
var revenue = window.parent.Xrm.Page.getAttribute("revenue").getValue();
if(revenue < 10000)
{
document.getElementById("websiteurl").style.backgroundColor = "Red";
}
}
It is throwing me an error saying "Cannot read property 'style' of null at ChangeBackgroundColor "
Thanks in advance.
*This post is locked for comments
I have the same question (0)