Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Simple Jscript not working

$
0
0

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


Viewing all articles
Browse latest Browse all 82002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>