You need to sign in to do that
Don't have an account?
Nagarjuna Reddy Nandireddy
how to display two objects fields in visualforce page by using wrapper class?
Hi all,
I want to two objects(Account,Contact) fields in vf page by using wrapper class
Please provide me a simple code for it.
Tanking you,
Nagarjuna Reddy Nandireddy
I want to two objects(Account,Contact) fields in vf page by using wrapper class
Please provide me a simple code for it.
Tanking you,
Nagarjuna Reddy Nandireddy
Please find below an example of how to accomplish this.
I've included 2 ways to do this:
- Using a single query
- Using a wrapper class
My controller (AccountContactWrapperController.class):My VF page (AccountContactWrapperTest.page):
Output:
I hope this helps!
Best regards,
Martijn Schwärzer
All Answers
Please find below an example of how to accomplish this.
I've included 2 ways to do this:
- Using a single query
- Using a wrapper class
My controller (AccountContactWrapperController.class):My VF page (AccountContactWrapperTest.page):
Output:
I hope this helps!
Best regards,
Martijn Schwärzer
Hi Martijn Schwarzer
thank you so much it was helped me a lot
Glad to be able to help!
If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Regards,
Martijn
Example to display two object data using wrapper class which do not have relationship in between them,
https://www.sfdc-lightning.com/2018/10/wrapper-class-in-salesforce.html