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
cnovocnovo 

Passing parent id to child record in VisualForce page

We have custom object the is a the Detail of a Master-Detail with Accounts. We are trying to override the "New" button so that the Account field is pre-populated. I'm sure this is possible with a VF page, but not quite sure how to do it. Can anyone help?

ArtieBrosiusArtieBrosius

In the constructor for the VF page, query for the parent record and grab its ID.  Reference this field on the VF page with an and it should be populated for you.