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
dev401hasdev401has 

Set look up field value in an object

I am having a visual force page with a picklist value of accounts.

Once i select an account and click a new button then new contact page should open and the Account field in the contact page should be updated with the account selected in the picklist.

I have made a page reference class which opens a new contact page but I am unable to update the account field on that page.

can anyone help me on this?

thanks

Best Answer chosen by Admin (Salesforce Developers) 
imuinoimuino

You should pass the account id as a parameter to the second page, and you set it on the second page start

All Answers

imuinoimuino

You should pass the account id as a parameter to the second page, and you set it on the second page start

This was selected as the best answer
dev401hasdev401has

I was doing the same thing but was getting some errors.

anyways I have solved it now.

thanks for the help.