You need to sign in to do that
Don't have an account?
Jean Grey 10
Display user's daily sales in apex datatable (Visualforce)
I have an apex datatable returning some User fields from a list in my apex class. I would like to include a column "This Month's Sales" which would return the total $ of opps closed won this month. I can run the SOQL in my class but I'm not sure how to get the correct result per user into the table, i.e. how to put it into the correct row and column in my table. Can I attach this $amount to each user without creating a custom field?
- https://webkul.com/blog/write-wrapper-class-apex/
- https://www.minddigital.com/what-is-wrapper-class-and-how-to-use-it-in-salesforce/
- https://cloudtechnzly.blogspot.ug/2017/08/wrapper-class-examples-in-salesforce.html
Each of those is a complete example. Wrapper classes are typically used to show additional columns in tables of sobjects. The additional columns are usually derived columns that do not naturally exist on the sobjects displayed. This is just what you are looking for so I am sure this will be of use to you.All Answers
- https://webkul.com/blog/write-wrapper-class-apex/
- https://www.minddigital.com/what-is-wrapper-class-and-how-to-use-it-in-salesforce/
- https://cloudtechnzly.blogspot.ug/2017/08/wrapper-class-examples-in-salesforce.html
Each of those is a complete example. Wrapper classes are typically used to show additional columns in tables of sobjects. The additional columns are usually derived columns that do not naturally exist on the sobjects displayed. This is just what you are looking for so I am sure this will be of use to you.