You need to sign in to do that
Don't have an account?
SFDCBEE
Calculate Total Revenue for parent Account with VF page
Hi All,
How to calculate total revenue with all child records sum and display in parent account VF page.
Suppose I'm having Parent Account 'Top-level' with 2 child Accounts 'A' & 'B'.
Account -- Revenue Field
A -- 100$
B -- 100$
Top Level --- A+B ie 200$
I have Tried Aggregate result but it is showing a list of accounts with the amount but not the total amount.
In VF I need to show in this format Top Level Account -- 200$
Please help me I'm new to development.
How can I do like all accounts in one List or Map and add them? and assign to variable and display the variable.I'm not getting how to put this in Code.
How to calculate total revenue with all child records sum and display in parent account VF page.
Suppose I'm having Parent Account 'Top-level' with 2 child Accounts 'A' & 'B'.
Account -- Revenue Field
A -- 100$
B -- 100$
Top Level --- A+B ie 200$
I have Tried Aggregate result but it is showing a list of accounts with the amount but not the total amount.
In VF I need to show in this format Top Level Account -- 200$
Please help me I'm new to development.
How can I do like all accounts in one List or Map and add them? and assign to variable and display the variable.I'm not getting how to put this in Code.
Hi
Please use this code
Kindly let me know if it helps you and please mark as Best Answer.
Thanks,