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
SainSain 

AutoPopulate Parent Object fields on the basis of selection of Lookup on child in VF Page

Hi,
I have requirment to auto populate parent object(Opporutnity) fields vales into child (Project__c) fields on the basis of selecting lookup field.
Please share the sample code.

Thanks in advance
Sain
bob_buzzardbob_buzzard
I wrote a blog post a while ago that shows how to retrieve fields from the child record.  This should be straightforward to adapt to copy values into the parent object:

http://bobbuzzard.blogspot.co.uk/2011/11/retrieve-related-object-fields.html