Hello,
we have a javascript that is meant to calculate a field based on other field values, but every time i try to enable it on an OnSave or Onload control i get an undefined error, i cant see anything wrong with the javascript myself but i could be missing something.
function CalcProjDaysLeft()
{
var nDP = Xrm.Page.getAttribute("new_pm_outstanding").getValue();
var nPI = Xrm.Page.getAttribute("new_devdaysleft").getValue();
var nDI = Xrm.Page.getAttribute("new_train_outstanding").getValue();
if((nDP == null) || (nDD == null))
{
return;
}
Xrm.Page.getAttribute("new_daysleft").setValue (nDP + nPI + nDI);
}
Is the script, any help would be greatly appreciated.
*This post is locked for comments
I have the same question (0)