+ Start a Discussion

How to save data of inputfields in cross object?

I am displaying all fields of other sObjects also in same standard controller, but if I click on save it is saving data into current controller object? Please help how to write logic



You'll need an extension controller in this case, which provides an override of the 'Save' method.  This method invokes the save of the parent standard controller and then saves all the related objects too.


There's an example of this on my blog at: