Ask Search:
Travis GrothausTravis Grothaus 

Stop an opportunity from being created unless it's in it's first stage

I have a process builder in salesforce classic which automates an opportuntiy, it works fine, however whenever someone creates an opportuntiy and it's not manually chosen to be in its first Qualify stage and saves it, it gives a nasty flow error.  Is there anything I can put into place to ensure a brand new opportunity is always in it's qualify stage before it's saved so I can avoid getting a flow error?
Best Answer chosen by Travis Grothaus
Travis GrothausTravis Grothaus
ended up using 

AND(
         ISNEW(),
         NOT(TEXT(StageName) = "Qualify" )
)

The Not() ensures that is HAS to be the first field that is chosen

All Answers

Andrew CookAndrew Cook
Hi Travis,

A validation rule may do the trick for this, something like the following:

ISNEW()
&& 
NOT (ISPICKVAL(StageName, “Qualified”))

This shouldn’t allow the opportunity to save when created unless the stage is set to qualified.
Travis GrothausTravis Grothaus
ended up using 

AND(
         ISNEW(),
         NOT(TEXT(StageName) = "Qualify" )
)

The Not() ensures that is HAS to be the first field that is chosen
This was selected as the best answer
Steve MolisSteve Molis
If you're using TEXT you can alos use = <> like this
AND(
ISNEW(),
TEXT(StageName) <> "Qualify"
)