我正在寻找编写一个 javascript 来更改 CRM 中任何文本字段的颜色这是我的 javascript:
function ChangeBackgroundColor()
{
var revenue = window.parent.Xrm.Page.getAttribute("revenue").getValue();
if(revenue < 10000)
{
document.getElementById("websiteurl").style.backgroundColor = "Red";
}
}
它给我一个错误说“无法在 ChangeBackgroundColor 处读取 null 的属性'样式'”
我可以完成这个定制吗?如果是,那怎么办?如果没有,那为什么?
提前致谢。