Select Page

A new knowledge base article has been published on our support portal.

Scenario Overview

In this business scenario we have a requirement to set and 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.

Whenever an Opportunity is transferred from one Account to another, we want this Total Open Opportunities to be recalculated for both the previous Account and the new Account

A key part of this requirement is that these two calculations must run in real-time. We can do this by creating two formulas, one to store the old Accounts accountid and the other to update the previous and new Accounts

N52 Formula Manager Solution

The Formula Manager solution works like this:

  • Each time an Opportunity’s Account is changed, two formulas will trigger
  • The first formula will store the previous Account’s accountid.
  • The second formula will calculate and update the Total Open Opportunities for both the old and new Account
    • The calculation 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 Total Open Opportunities