+ Start a Discussion
Soundar Raj PonpandiSoundar Raj Ponpandi 

How to create a roll-up-summary field without master details & apex coding

Hi,

I want to create a rollup-summary-field without using a master Detail and apex class.

1. Through Flow Or Process builder.

Can you please write a steps to create a roll-up-summary fields, Scenarios is follows.


1. I am using Account & Aaccount team members standard object.
2. When i add a new team members filed to be update in account "No of sales rep".
3. When i delete a account team members the same field should update as well.

Thansk in advance.
Soundar. 
 
Best Answer chosen by Soundar Raj Ponpandi
ShirishaShirisha (Salesforce Developers) 
Hi Soundar,

Greetings!

Please find the sample flow to acheive your requirement using the below link:https://www.youtube.com/watch?v=EDD_7wDmPGY

In case,If you would like to go for trigger then please find the sample code in the below document:

https://blogs.absyz.com/2016/03/16/roll-up-summary-without-a-master-detail-relationship/

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi Soundar,

Greetings!

Please find the sample flow to acheive your requirement using the below link:https://www.youtube.com/watch?v=EDD_7wDmPGY

In case,If you would like to go for trigger then please find the sample code in the below document:

https://blogs.absyz.com/2016/03/16/roll-up-summary-without-a-master-detail-relationship/

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
This was selected as the best answer
Soundar Raj PonpandiSoundar Raj Ponpandi
Hi Shirisha,

Really it's a valid information.

Thanks,
Soundar.
Soundar Raj PonpandiSoundar Raj Ponpandi
Hi Shirisha,

This flow is working when i create / update a  record, That is fine. But count is not decreased when i deleted related records.

Do you have any idea on that ?

Regards,
Soundar.
ShirishaShirisha (Salesforce Developers) 
Hi Soundar,

Whenever there are any changes made on the related records,then you need to edit and save the parent record to get the correct number as the process builder/flow fires whenever the record is created or edited.

Thank you!
Soundar Raj PonpandiSoundar Raj Ponpandi
Hi Shirisha,

can you please provide your answer for following Question ?

https://developer.salesforce.com/forums/ForumsMain?id=9062I000000R0v8QAC

Regards,
Soundar.