A response from an OData query may give back a money value that you would like to put into a field on a CRM 2011 form.
So to call and retrieve data from another entity using OData take a look here.
In the response section of code you will need to manipulate the value that you get back in order to populate the field correctly.
//Get the value of the returned money field
var WagesStringValue = retrievedEmployee.new_currentwages.Value;
// Getting rid of the comma
WagesStringValue = WagesStringValue.replace(",", "");
// Convert string to float
var WagesValue = parseFloat(WagesStringValue);
//Put the value into a form field
Xrm.Page.getAttribute("new_jobpayrate").setValue(WagesValue)
Happy crmin!
Recent Comments