1

How can you set a default value for the following field on Opportunity?

Field: Stage

Default value: "Stage 1 - Qualified"

1
  • Do you have record types on Opportunity? Commented Jun 15, 2016 at 7:34

4 Answers 4

6

there are two ways to set a default value for the following field on Opportunity

  1. using workflow and field update
  2. Trigger.

Through Trigger you can do like

trigger OpportunityTrigger on Opportunity (before insert) {
 for(Opportunity opp: trigger.new){
       //You can setup stage name here
       opp.stagename = 'Stage 1 - Qualified';
 }

}

3
  • I think these are the most effective ways of doing it as the other methods only work for custom fields rather than the standard Opportunity Stage.
    – Dave Humm
    Commented Jun 15, 2016 at 8:32
  • @amit-jain this trigger works fine Commented Jun 15, 2016 at 8:49
  • Can we set picklist ready only. means i have create 5 workflow when first requirment completed its go on stage -2 value and so on. user cannot change picklist value manulay it will change by workflow Commented Jun 15, 2016 at 8:52
1

Try the below process

  1. Create a Button of "New" in Opportunity object and replace it with the Standard "New" Button.
  2. In that Button, Give the URL like below

/{!Opportunity.Id}/e?opp11=Stage 1 - Qualified

NOTE: You can give any value in the place of "Stage 1 - Qualified" as Default Value.

and Lastly Save the Button and Put this button in the Layout and Hide the Standard Button

Now whenever you click this button, your opportunity will be open with the Stage Name as "Stage 1 - Qualified"

Hope this might helps...

1
  • Can we set picklist ready only. means i have create 5 workflow when first requirment completed its go on stage -2 value and so on. user cannot change picklist value manulay it will change by workflow Commented Jun 15, 2016 at 8:52
0

To make the field value default you have to just tick the checkbox saying "Make the first value default" as shown in the screenshot.

enter image description here

1
  • 1
    I know We can Set Default Value but its work on custom Field not on the standard picklist field Commented Jun 15, 2016 at 7:39
-1

Workflows and Triggers won't work if you are creating an opportunity. You will have to design a new VF page and create a custom new button.

You can use Quick Actions to use as a workaround.

2
  • 1
    Why do you think Workflows and Triggers wouldn't fire in this situation?
    – Adrian Larson
    Commented Dec 13, 2017 at 19:52
  • Hi Adrian, as you probably know the Stage doesn't have a feature to set a default value. When you create a new Opportunity you must pick a value for stage field. Therefore if you want to have a default value, the user must select a value and then you can override it. For me and my users this doesn't work, what they wanted is something with the default already there. The Javascript validation that works on standard Opp page avoid you using a workflow or trigger for doing that.
    – Tiago
    Commented Dec 15, 2017 at 9:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .