-
-
Notifications
You must be signed in to change notification settings - Fork 30
Configuring Hierarchy Ultimate Parent Rollups
For hierarchy fields (Parent
on Account being a prime example), or the equivalent of hierarchy fields (custom lookup fields that reference the same object), it's possible for many of the same object to have the same parent. In these cases, you may find it beneficial to set up rollups where it is not the intermediate "parent" for any given set of children records that receives the rolled-up values, but rather to "continue up the chain" until you've reached the "ultimate parent" record:
In this example, it's possible using Apex Rollup to take information from Contacts A, B and C and roll them all up to Account A.
If the child object is only one level down from parent, there's no need to use the above two fields in conjunction with the Grandparent Relationship Field Path
field; it's not necessary for an ultimate parent rollup to be configured as a grandparent rollup unless you're also skipping intermediate objects. If you are skipping intermediate objects, make sure to follow the steps outlined in the Grandparent Rollup wiki page, prior to proceeding here.
It's necessary to use two additional fields on your Rollup CMDT records for ultimate parent rollups:
-
Rollup To Ultimate Parent
- this checkbox needs to be toggled -
Ultimate Parent Lookup
- select the field on the parent-level record that contains the hierarchy/ultimate parent lookup (so,Parent Account ID
in the dropdown for the Parent Account example above)
Here's an example Rollup CMDT record configured as both a grandparent and ultimate parent rollup:
And an example ultimate parent rollup configured without a grandparent rollup:
Note that the configuration is essentially the same as with the CMDT, above:
- Toggle
Should rollup to ultimate hierarchy parent
and set it to{!$GlobalConstant.True}
: - Toggle
Ultimate Parent Field
and write the API field name for the hierarchy/ultimate parent lookup field on your parent-level object
Following these simple steps should allow you to successfully configure and administrate your ultimate parent rollups!