You need to sign in to do that
Don't have an account?
Avnit Kumar
How display accounts and related contacts using wrapper and map?
Hello Peeps
I am quite new in salesforce so please anyone can help me. I have to display the Accounts in checkbox and their related contacts in selectoptions. condition is that when i tick the checkbox of any account and click on the clone button the their related contacts will be cloned. sorry forgot to tell you i've to create a custom clone button too. And i have to do this by using wrapper and map. Proper code will be appriciated.
Thanx in Advance
I am quite new in salesforce so please anyone can help me. I have to display the Accounts in checkbox and their related contacts in selectoptions. condition is that when i tick the checkbox of any account and click on the clone button the their related contacts will be cloned. sorry forgot to tell you i've to create a custom clone button too. And i have to do this by using wrapper and map. Proper code will be appriciated.
Thanx in Advance
Here's a sample Wrapper class that might help you. You add an Account to it and then it populates a SelectOption List with the related Contacts.
In the Visualforce Page you can then reference the Wrapper Object variable, or iterate through the List of Wrapper objects to display the data. Here's an example of both types variables. Keep in mind that you need to instantiate them in the constructor method of your class or an "Action" method...
I hope this helps. Let me know if you need any additional details.
Jason