In this webinar, our experts showcase a variety of demo use cases of how different components of the...
In Microsoft Dynamics CRM 2011 or 4.0, you can Add, Subtract, Multiply or Divide the values of 2 fields using a Workflow. Often times this is done using JavaScript but the step below will walk you through the process using a simple workflow. In this example, we are going to calculate the Weighted Value of an Opportunity using the "Estimated Revenue", "Probability Fields" and a custom field named "Weighted Value".
Ideally, we would want to populate the Weighted Value field with the result of the formula (Estimated Value X (Probability/100)). Unfortunately, this is not possible in a single step using a workflow.
You will need 3 Update Steps as shown below:
Here are the details of each Update Step:
Step 1: Create a Workflow on the Opportunity entity.
Step 2: This Workflow should "Start when":
Record is created
Estimated Revenue or Probability is changed
Step 3: Add an Update Opportunity step and populate the "Est Revenue" value into the "Weighted Value" field.
Step 4: Add an Update Opportunity step and multiply the "Weighted Value" field by the Probability.
Step 3: Add an Update Opportunity step and divide the "Weighted Value" field by 100.
Please note, because workflows are processed via the Asyncronous Service, the Weighted Value field will not be populated with the correct value instantaneously. If you require the value to be updates immediately upon changing the Est Revenue or Probability fields, you will need to utilize JavaScript. In many cases, the workflow option will meet your need.
As always, if you need additional assistance with Dynamics CRM, don't hesitate to reach out to PowerObjects, the 2012 Dynamics CRM Partner of the Year!
Happy CRM'ing!
Hi Joe. this is a fantastic post. thank you very much for putting it up. I have a little problem at STEP 4. I dont have a option for MULTIPLY BY. any suggestions for me? will be very appreciated?
Hi Joe. this is a fantastic post. thank you very much for putting it up. I have a little problem at STEP 4. I dont have a option for MULTIPLY BY. any suggestions for me? will be very appreciated?
Hi - If you are still using crm 2011, you will need this workflow addition from code plex that then allows you the ability todo math via workflows. CRM 2015 this and many other things are out of the box.
https://manipulationlibrary.codeplex.com/