You need to sign in to do that
Don't have an account?

trouble setting up opportunity validation rule
I'm trying to set up an Opportunity validation rule, whereby if "Closed Lost" is selected from the Stage picklist, a specified custom field (Reason) must be completed.
I set up the formula as follows:
AND (
ISPICKVAL(StageName,"Closed Lost"),
ISNULL(Reason__c))
No errors are found, but I do not get an error message when selecting this criteria.
Also, can validation rules be specific to certain record types only?
Thanks for your help!
Validation rules are at the field / record level and are not page layout specific. Your alternative is add some additional criteria to the validation rule to look at the current user's profile and only require it if their profile is one of the Sales profiles.
AND(ISPICKVAL(StageName,"Closed Lost"), LEN(Reason__c)=0, AND( $Profile.Name = "Your Sales Profile Name", $Profile.Name = "Your Other Sales Profile Name"))
All Answers
We have picklists as our Reason Lost and have that field as a Dependent Drop-down based on the Stage. But if you want to leave the Reason Lost as a free-form text field, that won't work obviously.
It is an option to consider and makes reporting easier to see how many deals we lost due to Price, or Function, or Delivery Date, etc. Text fields are fine for capturing the story but not feasible for reporting metrics back to Mgmt.We also have a free-form field where they can put their story and many of them do so that the information is captured somewhere and they don't have to field calls saying - "what happened????"
You can't use the ISNULL function to check for null in text fields. You have to use the LEN function instead.
AND(ISPICKVAL(StageName,"Closed Lost"), LEN(Reason__c)=0)
hmmm, still doesn't seem to work.
a separate picklist exists for set closed lost reasons (for reporting purposes), but management wants additional commentary from the sales team (required). this free text field is what i'm trying to make required by creating a validation rule.
does anyone know if validation rules can be specific to each page layout when the fields are shared?
thanks
Validation rules are at the field / record level and are not page layout specific. Your alternative is add some additional criteria to the validation rule to look at the current user's profile and only require it if their profile is one of the Sales profiles.
AND(ISPICKVAL(StageName,"Closed Lost"), LEN(Reason__c)=0, AND( $Profile.Name = "Your Sales Profile Name", $Profile.Name = "Your Other Sales Profile Name"))