Views:

Scenario Overview

In this business scenario you have a requirement to set & continually update a custom field on the Account entity called 'Total Open Opportunities'. This field is the sum of the estimated revenue field from all the opportunity records associated to the Account.

A key part of this requirement is that roll-up must run in real-time.

Note: This scenario is also outlined in other articles using Decision Tables and the FindSum and FindSumFD (Fetch-Xml) methods.

N52 Formula Manager Solution

The Formula Manager solution works like this,

  • We create a formula of type 'Save To Parent' for the Opportunity entity
  • Each time an Opportunity is Created, Updated (only when  'Est. Revenue' field changes) or Deleted the formula will execute
  • The execution consists of summing up all the related opportunities that are currently set to Open
  • The result of the sum will be stored in the custom field of the parent Account record

N52 Formula Manager Steps

  • Create a new formula of type 'Save - To Parent'
  • Set the Event field to 'Create, Update & Delete'
  • Set the Source entity to 'Opportunity'  
  • Set the Source Property to 'Est. Revenue'    
  • Set the Relationship field to 'customerid (account)'
  • Set the Target Property field to 'Total open Opps'.
  • Copy & paste the formula below into the formula description field & click save
  • You are ready to test

Formula

FindSum('opportunity',
        SetFindAnd('customerid', 'statecode'), 
        SetFindAnd([opportunity.customerid], '0'),
        'estimatedvalue','0')

Wizard - FindSum

Please see below the wizard you can use to create the FindSum() function call used in this formula.

Note 1: You will need to put the two SetFindAnd lines in manually (or copy from the formula above) 

 

Did you know?

Over 300 customers use North52!

Join over 300 organizations worldwide who trust North52 to drive their digital transformation into the future:

Serious Power without Code:  Easily build business rules, tests and data packages using our point-and-click editors. Even the most complex business rules are easily configured.

Build Fast:  We’ve built the North52 tools with our user’s productivity in mind – up to 10x faster than writing custom code.

Awesome Support:  We take pride in providing world class support to our customers and partners, ensuring you are successful with North52.

Future Proof:  We ensure your business rules and tests that you configure today, will continue to work with the ever changing Dynamics 365 platform.

Learn more about the North52 Decision Suite