Hello all,
I have some jscript code onload (CRM 2011 onpremise):
function get()
{
var one = Xrm.Page.data.entity.attributes.get("new_orderamount").getValue();
var two = Xrm.Page.data.entity.attributes.get("new_actualcost").getValue();
var totalParse = 0;
if ((two > 0 or two != null) and (one > 0)) {
totalParse = (1-(two/one))*100;
//alert(totalParse);
}
Xrm.Page.getAttribute("new_new").setValue(totalParse);
Xrm.Page.data.entity.attributes.get("new_new").setSubmitMode("always");
}
However when i open the form i always get this error (through F12 in IE):
Error: The Value of property 'get' is null or undefined, not a function object
Can anyone help?
Thanks in advance.
*This post is locked for comments
I have the same question (0)