You need to sign in to do that
Don't have an account?
Preeti Khanna 10
To calculate sum of fields and display on the visualforce page
I have created 3 fields say Amount1,Amount2 and Amount3 in an object.User will input the same on visualforce page and its sum should be displayed in total field on the visualforce page.
Please find the modified code:
Controller is same and no change.
I also tested the above code and it looks good.
Please do let me know if it helps you.
Regards,
Mahesh
All Answers
Please find the below code:
VF Page:
Controller Extension:
I also tested the code in my DE environment and below is the output:
Please let me know if it helps you.
Regards,
Mahesh
Is it possible to achieve the same without command button and when the fields are updated.
Kindly suggest.
Please find the modified code:
Controller is same and no change.
I also tested the above code and it looks good.
Please do let me know if it helps you.
Regards,
Mahesh
Thanks alot for your help and it is working fine.
One more issue I have in same page I need to divide the total field by 55 and multiply by 100 .
As I am new to salesforce so not able to get the desired result.
Please use the below code:
Regards,
Mahesh
Thanks for your help!
I have tried the same but it is not working.
0 is displayed in total .
I need to display it separately in percent field and it is displaying as 0 in that new field also.
Regards,
Preeti
Please find the below code:
Please do let me know if it helps you.
Regards,
Mahesh
Thanks for the reply!
Issue I ma having is that my three fields are picklist fields and I am summing up the values in total which is displayed correctly.
But as it is picklist field so system is not calculating percent and displaying as zero.
Please help asap.
Regards,
Preeti Khanna
i have tried this code but i cannot see any total or calculate field in aacount page as im new so please help!