function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sienna Luard 3Sienna Luard 3 

Validation Rule that prevents users who do not have the Accounting Profile from saving an Opportunity as Closed Won IF the Accounting Stage is updated so that it is NOT null.  

Hello, 

I need to update this validtion rule:

AND(ISPICKVAL(PRIORVALUE( StageName ), "Closed Won"), $Profile.Name <> "Accounting")

The rule now needs to prevents users who do not have the Accounting Profile from saving an Opportunity as Closed Won IF the Accounting Stage is updated so that it is NOT null.  

I tried this:

AND(ISPICKVAL(PRIORVALUE( StageName ), "Closed Won"), $Profile.Name <> "Accounting"),
 ISCHANGED( Accounting_Status__c )

But I get the error msg Error: Syntax error. Extra ','

Does anybody have any ideas?
Best Answer chosen by Sienna Luard 3
Alain CabonAlain Cabon
Hi,

AND(ISPICKVAL(PRIORVALUE( StageName ), "Closed Won"), $Profile.Name <> "Accounting",ISCHANGED( Accounting_Status__c ))

Regards

All Answers

Alain CabonAlain Cabon
Hi,

AND(ISPICKVAL(PRIORVALUE( StageName ), "Closed Won"), $Profile.Name <> "Accounting",ISCHANGED( Accounting_Status__c ))

Regards
This was selected as the best answer
Sienna Luard 3Sienna Luard 3
Thanks so much!  This worked perfectly.

I really appreciate your help