function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RishuRishu 

Sum the field value using flows

Hi,
I have a requirement to sum amount field of child object and update it on parent object using flows.

There is a lookup relationship from object 1(child) to object 2(parent). The requirement is to sum the field on child object and update it on the parent object.

Object 1 can have multiple child records.

 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you confirm if there is some button to calculate or do you need any record triggered flow on Child or parent object to achive it. So based on it we can implement the flow logic.

Thanks,
 
RishuRishu
We need to achieve it using record triggered flow on parent
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Rishu,

I have used Account as parent object and Opportunity as Child object to update the total amount of all oppies on Account.

Start element.

User-added imageGet child records for the parent:

User-added imageFor loop:

User-added image

Create a variable as below.
User-added image
Assigment :

User-added image

Posting the remaining elements and total flow in next comment.


Thanks,


 
Sai PraveenSai Praveen (Salesforce Developers) 
Cont...

User-added imageTotal Flow:

User-added image
Let me know if you face any issues in this flow.


Please mark it as best answer, If this helps.

Thanks,