You need to sign in to do that
Don't have an account?
Custom List Controller updating Multiple Records of different type (Account and Contact)
Hello
I developed a Visualforce Page with a Custom List Controller.
I display several Contacts in a matrix on my Page.
I display these fields:
- Contact First Name
- Contact Last Name
- Contact Phone
- Account Name
- Account Phone
I want to be able to make changes to all of these fields, and SAVE.
In this case I change Contact Fist Name AND Account Phone, I want to be able to SAVE and UPDATE both the Contacts and the Accounts records.
Is there a way to do this in a custom controller?
I am nos sure how my getters and setters would be defined in order to get the new values for the Account fields
Thanks
Giorgio
My suggestion is to create an actionFunction that has the 5 fields as parameters.
Then in your controller, that action should get both the Contact and Account record, assign the field values to them, and then save the records.
Thanks for the feedback.
I was able to solve this using a warpper class