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
LiorGLiorG 

How to pre-populating fields?

When a user clicks "new" to make a new opportunity, they are faced with an entry form to enter in information. Is it possible to pre-populate one of these fields on this entry form using a trigger? 

Syed.YasirSyed.Yasir

There are three ways of doing it.

 

1. Use record type default values if these fields are picklist fields.

2. You can definitely do it within Trigger but it will not show on screen until you save record.

3. Override New Button and use a visualforce / Apex to prepopulate fields in Opportunity Form.

 

 

pankaj.raijadepankaj.raijade

you can pass values throuth URL as well.

 

Regards,

Pankaj Raijade

CRM AdminCRM Admin

Hi,

Need assistance with your post 

http://boards.developerforce.com/t5/General-Development/How-to-set-standard-field-to-a-Default-value/td-p/333595

 

We could not get to populate the Opportinity name field. The URL shows https://....salesforce.com/006/e?retURL=%2F006%2Fo we do not see the opp3 value being passed.

 

Please help.

raseshtcsraseshtcs

Could you let me know the exact problem you are facing...

CRM AdminCRM Admin

Hi,

Thanks for responding.

When we create a new opportunity we want the opportunity name to be defaulted to some value (just in the UI). I am trying to use your example to pass that in the query string. But in the URL i do not get the value of opp3.

This is what we see in the URL https://....salesforce.com/006/e?retURL=%2F006%2Fo

raseshtcsraseshtcs

The code in the post should work... could you paste the code that you are using here so i can take a look at it.