In our example here, a customer wishes to know the amount of completed tasks on an Opportunity in real time.
We shall use a North52 formula type called 'Save - To Parent ' to do this easily.
Note : You will need to create a custom field called Completed Tasks for this example.
North52 Decision Suite Solution
The North52 Decision Suite solution works like this,
- Whenever a Task on an Opportunity is set to Completed, the formula is triggered.
- The formula will count all tasks on that Opportunity that have been set to Completed
- It will then update a custom field called Completed Tasks with this calculation.
North52 Decision Suite Steps
The following set of steps assumes you are just using the out of the box Dynamics 365 setup. But its easy to enhance if you have extra fields \ requirements.
- Create a new formula of type 'Save - To Parent'
- Set the Event field to 'Create & Update'
- Set the Source Entity to 'Task'
- Set the Source Property to 'Status Reason'
- Set the Relationship to 'regardingobjectid(opportunity)'
- Set Target Entity to 'Opportunity'
- Set Target Property to 'Completed Tasks '. Note you will need to have created this custom field beforehand.
- Copy & paste the formula below into the formula description field & click save
- You are ready to test
FindCount('task', SetFindAnd('regardingobjectid','statuscode'), SetFindAnd([task.regardingobjectid], 5), 'activityid','0','true' )
Did you know?
North52 TestShield ensures Quality at Speed
TestShield's automated tests run on the Dynamics 365 platform rather than in the browser allowing extreme speed.
For example, we can run 1100 tests with over 15,000 Asserts to verify a new release of the North52 Decision Suite, in less than 4 minutes!
It means that we can deliver quality releases at unprecedented speed. Before TestShield, testing a new release was very manual and time consuming.