Skip to main content

Need to total the price, in the Related list. Need help

 

how to add SUM /total field in Related List table salesforce

 

 

#Sales Cloud

2 Antworten
  1. 21. März 2024, 07:52

    Hi,

     

    If the relationship to the parent is a master detail, you could create a roll up summary field on the parent that woudl sum the total price.

    In the object in the related list, you can then create a formula field:

    Parent__r.RollUpSummary

     

    If it's a lookup relationship, it's a lot harder. You would need code or flows that would trigger on creation or when a price is changed on the child object. You would then have a Get Record to check all the other related records, related to the same parent record. You would now loop through them and add the Total Prices and finally update all these child records with the new tally.

    You would need another flow on delete to subtract to the total.

     

    The issue with flows or code is that it only triggers on creation or update of a record, so, for existing records, you would need to do a mass update, either manually (data laoder for example), or with a scheduled flow/apex

0/9000