Rolling up contract end date to the account level – example

Here are the steps required to roll up contract end date to the account level.

The following is using Rollup helper which allows you to roll up content for related objects. Rollup helper is using standard Salesforce technologies e.g. APEX classes and APEX Triggers to roll up info either instantly or in batch. The service is free for the first three fields.

There is one field required: (1) contract end date . The field will be added to the account level and their content will be rolled up from the Contracts object.

  1. Navigate to the Rollup Helper app and create a new rollup

2.  Select the accounts object

3. Create a new field – Contract End Date – Example

4. Select source field and start defining the required logic

5. Create New Filter – to ensure that it only picks the right contract

Here is the way to define the filter:

  1. Remove deleted record – default by Roll up helper
  2. The earliest contract end date which is greater than 6 months (180 days).

That’s the outcome of the filter definition.

WHERE isDeleted = false 
AND enddate > NEXT_N_MONTHS:6 
ORDER BY EndDate ASC NULLS LAST LIMIT 1

Save the filter

6. Save and Run the rollup

7. Let it calculate the value for the first time

You are done.

8. The newly created field may not be accessible for the relevant profiles. So you may need to enable Salesforce access.

Was this article helpful?

Related Articles

Leave A Comment?