You need to sign in to do that
Don't have an account?
Dee Dee Aaron
Unable to use roll-up summary field to calculate product total.
Hi.
I’ve tried using a formula field to map the value and it worked! The problem is that I need to create a roll-up summary field that says: SUM of opportunity products where Eligible for Commission equals “Yes”.
I cannot filter by the Eligible for Commission field because it is a formula field. I also tried creating a workflow rule and a text field. I was able to filter by the text field on the roll-up summary field, but the workflow rule won’t successfully update the child record based on the parent (only the other way around).
I'd prefer to stay away from creating a process builder, if possible. Sometimes, when Salesforce releases updates, the process builders just stop working suddenly. Any advice would be helpful. Thank you!
- On the Product Object, I have a picklist field: Eligible for Commission (Yes/No).
- On the Opportunity Product, I would like to add a field called: Eligible for Commission.
I’ve tried using a formula field to map the value and it worked! The problem is that I need to create a roll-up summary field that says: SUM of opportunity products where Eligible for Commission equals “Yes”.
I cannot filter by the Eligible for Commission field because it is a formula field. I also tried creating a workflow rule and a text field. I was able to filter by the text field on the roll-up summary field, but the workflow rule won’t successfully update the child record based on the parent (only the other way around).
I'd prefer to stay away from creating a process builder, if possible. Sometimes, when Salesforce releases updates, the process builders just stop working suddenly. Any advice would be helpful. Thank you!
Greetings!
You can achieve this by using the flow invoked by the Process builder and trigger as well.Since you do not want to go with the Process builder then you can proceed with the trigger.
Please find the sample code from the below blogs and make changes according to your business requirement.
https://www.biswajeetsamal.com/blog/custom-rollup-summary-field-using-apex-trigger/
https://medium.com/@palanic/roll-up-summary-from-child-account-to-patent-account-d0d97114e883#:~:text=and%20process%20builder-,Using%20Apex%20Triggers,Named%20as%20Total%20Opportunity%20Amount.
Kindly mark it as best answer if it helps so that it can help others in the future.
Warm Regards,
Shirisha Pathuri