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
AbAb 

prepopulate values when we click new quote

Hello,

I have a related list Quote on page opportunity.
When i click on new i wan that the field lookup(custom) is prefilled with some value.

how can i implement it, thank you for suggestion
Best Answer chosen by Ab
Pawel BorysPawel Borys
If you mean you want it prefilled in the new record form before a user clicks save then it's not possible using the standard action. If you just need it filled automatically after save button is clicked then take a look at the links Johnathan provided.

All Answers

Jonathan A FoxJonathan A Fox
You could look at using the Process builder to do this:

https://trailhead.salesforce.com/en/content/learn/modules/business_process_automation/process_builder

or you could create a before trigger if you have a way to define which record should be on that lookup field:

https://trailhead.salesforce.com/en/content/learn/modules/apex_triggers/apex_triggers_intro
Pawel BorysPawel Borys
If you mean you want it prefilled in the new record form before a user clicks save then it's not possible using the standard action. If you just need it filled automatically after save button is clicked then take a look at the links Johnathan provided.
This was selected as the best answer