0

I have a validation rule that doesn't allow non admins to change the Stage value if it's currently Closed Won.

I need to add 2 more criteria to it:

  • If the Stage is Closed Lost don't allow a change to stage
  • Don't allow a change to Close Date if Stage is Closed Won or Closed Lost

I'm not sure how to get that all into this one existing validation rule:

ISCHANGED(StageName) &&
ISPICKVAL(PRIORVALUE(StageName),'Closed Won') &&
$Profile.Name != 'System Administrator'

Can I?

2
  • 2
    Whether or not this is possible in a single Validation Rule seems like a secondary concern to me. From your description, this sounds like it should be 2 separate validation rules (instead of trying to condense everything into a single validation rule).
    – Derek F
    Aug 14, 2022 at 18:58
  • That is a very good suggestion. Thanks for your input.
    – user7417
    Aug 15, 2022 at 12:38

1 Answer 1

0

You can try:

((ISCHANGED(StageName) &&
(ISPICKVAL(PRIORVALUE(StageName),'Closed Won') || ISPICKVAL(PRIORVALUE(StageName),'Closed Lost'))) || (ISCHANGED(CloseDate) && (ISPICKVAL(StageName,'Closed Won') || ISPICKVAL(StageName,'Closed Lost')))) &&
($Profile.Name != 'System Administrator')

However, I think you should create different validation rules since you can show different error messages depending upon different conditions.

1
  • Thanks, that validation rule did work but I ended up going with 2 different ones...for clearer error messages as you stated. One for the close date change and one for the Stage changes. Even though I didn't use it, I'll mark yours as best answer since you did provide one that works and also suggest multiple. Thanks.
    – user7417
    Aug 15, 2022 at 12:40

You must log in to answer this question.

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