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
NongNong 

How can i preselect picklist field?

Dear All,

Could you please advise me for the solution as i have field product picklist in Opportunity object and Contract object.
User can create Contract under the Opportunity.

Once user create new Contract. On New Contract page,  i would like to preselect  Contract 's product with the same value of  Opportunity 's selected product .

How can i do this by customizing? or do i need to work on the Apex code?

Thank you very much in advance for your advise.

Best Regards
Anong

Damien_Damien_

I would assume that you would have to set that field in your constructor of your apex class.

NongNong

Dear Damien,

 

Because i the beginner of Apex coding, could you please help to give some example code of doing this action?

 

Thank you very much in advance for your help.

 

Regards

Anong

Ispita_NavatarIspita_Navatar

You can implement this by writing a workflow/trigger on Contract Object.

Damien_Damien_

The other persons idea sounds simpler than mine.