Views:

Scenario Overview

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. 

N52 Formula Manager Solution

The Formula Manager 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. 


     

N52 Formula Manager Steps

The following set of steps assumes you are just using the out of the box Dynamics CRM 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

Formula

FindCount('task',
        SetFindAnd('regardingobjectid','statuscode'),
        SetFindAnd([task.regardingobjectid], 5),
        'activityid','0','true'
      )