function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vasu@blrVasu@blr 

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

 

bob_buzzardbob_buzzard

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:

 

http://bobbuzzard.blogspot.co.uk/2011/03/edit-parent-and-child-records-with.html