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
JRTConsultJRTConsult 

Passing related ID to Custom Object in a visualforce page

I am trying to create a survey that is related to our account object.
 
I have created a custom object called Survey, created a master-detail relationship between account and survey, created my visualforce page. I would use the standard object layout but the field labels are too long to display so I created my visualforce page. When the user selects "New Survey" from the related list section of account, they see the survey, but the "Client_Name__c" field is blank on the visualforce page and the user has to manually select the name of the account from whose record they just navigated.
 
How can I get that field to auto-populate the "Client_Name__c" with the ID of the account object?
 
 
MPIMPI
My first instinct would be to check to see if that variable is passed either through get, or can be gotten through {$CurrentPage.parameters.XXXXX}. That way you may just be able to toss in some javascript to fill in the value of that particular input field.

Seems like there should be a better way though. Maybe someone more knowledgeable will have a better idea. =)