0

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

Field: Stage

Default value: "Stage 1 - Qualified"

  • Do you have record types on Opportunity? – sfdcFanBoy Jun 15 '16 at 7:34
5

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';
 }

}

| improve this answer | |
  • 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 Jun 15 '16 at 8:32
  • @amit-jain this trigger works fine – Vipin Indora Jun 15 '16 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 – Vipin Indora Jun 15 '16 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...

| improve this answer | |
  • 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 – Vipin Indora Jun 15 '16 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

| improve this answer | |
  • I know We can Set Default Value but its work on custom Field not on the standard picklist field – Vipin Indora Jun 15 '16 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.

| improve this answer | |
  • 1
    Why do you think Workflows and Triggers wouldn't fire in this situation? – Adrian Larson Dec 13 '17 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 Dec 15 '17 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.