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
Rahul Bhattad 4Rahul Bhattad 4 

Auto populate is not working when creating child record from related List on parent record

I have two objects in this scenario: Main-Offer which is parent object and Sub-Offer which is child object related with Main-Offer via Lookup. I have overridden the New button of Sub-Offer object with VF page which conditionally redirects depending on condition with the help of Action attribute:
 
action="{!IF(redirectPage=true,NULL,URLFOR($Action.Sub_Offer__C.New,null,null,true))}"

​​​​​​​Now the issue is coming when I am trying to create Sub-Offer record from the related list of parent record of Main-Offer. It's not populating the value of Lookup field on the page with the Parent Record's name.
Any suggestion and ideas will be very much appreciated.
ShirishaShirisha (Salesforce Developers) 
Hi Rahul,

Greetings!

Please go through the below link which might help you in your requirement.

https://salesforce.stackexchange.com/questions/192746/how-to-auto-populate-a-new-child-records-lookup-field-with-a-parents-field-whi

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri