I am having trouble getting a calculation function to work. I have 3 fields all of which are floating point numbers with a precision of '2'. Two fields have a range of 0.00 to 1,000,000.00 and another has 0.00 to 1.00 (percentage). The goal is to take 'newprojectcomplete' multply it by 'newcontracthours' and populate the result value to 'targethours'. Keep getting the same error no matter how I write the code. "Error: The value of the property 'Calc_target' is null or undefined, not a function object"
Any help?
Here is the function I wrote:
function Calc_target() {
Xrm.Page.data.entity.attributes.get("test_targethours).setValue() = Xrm.Page.data.entity.attributes.get("test_newprojectcomplete").getValue() * Xrm.Page.data.entity.attributes.get("test_newcontracthours").getValue();
}
Thanks