We recently had a requirement wherein we had one custom entity Financial Detail associated to Account as many to one relationship.
i.e. One account record can have multiple Financial Details records associated.
We had this field Total (currency) in Financial Detail entity of type currency.
The requirement was to have sum of Total of all related Financial Details records of the Account record plus of any Sub Accounts (child accounts up to n level).
It would have been painful if we had to implement the same using Plugin.
This we can achieve easily using Rollup Field in Account
Below is the definition of the Roll up field named Total Rollup
- Set Hierarchy as Yes.
- Select Financial Details as the related entity.
- Filter based only Active records.
- In Aggregation specify Sum of Total (currency field in Financial Details record).
Hope it helps.
It is Very helpful for me to understand about the Rollup field.
Thank you 🙂
LikeLike