No more JavaScript to calculate fields in Microsoft Dynamics CRM 2015

By - March 2, 2015

One of the new features in Microsoft Dynamics CRM 2015 is the addition of calculated fields.  This is something that previously had to completely done through JavaScript and could take a considerable amount of time depending on the complexity of the calculation.  Microsoft has significantly reduced the amount of time necessary to do on the fly calculations by adding the functionality for calculated fields directly through the attribute form.

To create a new calculated field, it’s as simple as adding a new attribute and selecting Calculated as the field type.

No More JavaScript 1

Once you have selected Calculated you can click edit to create the formula.

First I want to check to make sure the Quantity field actually has data before I do the calculation, so we have the ability to specify a condition for the system to check before executing the formula.

No More JavaScript 2

Once your condition has been set then you can create the formula.

No More JavaScript 3

Now the Total Price field will automatically calculate as long as the Quantity field contains data.

You can continue to build out these formulas based on the requirements but also have the ability to put an “ELSE” clause in. So if the Quantity field contains data it will do the calculation, “ELSE”, execute another formula.

This new functionality can save significant time since JavaScript does not need to be used anymore for these types of calculations.  There are also formulas to manipulate date fields with commands like  ADDDAYS, ADDHOURS, ADDMONTHS, ADDWEEKS, etc.  This new feature also makes it easier for the customer to manage changes to the system if they are not familiar with JavaScript.

If you have questions about this or need other support services for Dynamics CRM, contact our professionals at crm@rsmus.com.  RSM has been implementing Dynamics CRM since version 1.0 and can support solution that are the basic “out of the box” model to a complex architecture featuring automation, dashboards, system integration and custom development.

Learn more about the features added to Microsoft Dynamics CRM 2015.

By: John Annunziato – Philadelphia Microsoft Dynamics CRM partner

 

Receive Posts by Email

Subscribe and receive notifications of new posts by email.