Skip to main content
In my org, I have this complicated Validation rule requirement. I have this validation that if status is new nobody should be able to edit except Billing and System admin profile but we have some approval process fire at the same time and that is blocking user so I need changes in below Validation rule. 

 

Requirement is 

 

User should be able to edit if 

 

Status = New

 

OR 

 

Status = Pending Approval AND Prior Status = New 

 

OR 

 

Status = Approved AND PRIOR Status = Pending Approval. 

 

OR

 

Status = Rejected AND PRIOR Status = Pending Approval. 

 

Here is the Validation Rule I created which is not working as it should be 

 

AND( 

 

$Profile.Name <> 'Billing', 

 

$Profile.Name <> 'System Administrator', 

 

$Profile.Name <> 'Finance Users', 

 

OR( 

 

RecordType.Name = 'PO Request (B)', 

 

RecordType.Name = 'Invoice' 

 

), 

 

NOT( 

 

OR 

 

 

TEXT(Status__c) = 'New', 

 

AND( 

 

TEXT(Status__c) = 'New', 

 

TEXT(Status__c) = 'Pending Budget Line Owner Review'), 

 

AND( 

 

TEXT(PRIORVALUE(Status__c)) = 'New', 

 

TEXT(Status__c) = 'Pending Budget Line Owner Review'), 

 

AND( 

 

TEXT(PRIORVALUE(Status__c)) = 'Pending Budget Line Owner Review', 

 

TEXT(Status__c) = 'Budget Line Owner Approved'), 

 

AND( 

 

TEXT(PRIORVALUE(Status__c)) = 'Pending Budget Line Owner Review', 

 

TEXT(Status__c)='Budget Line Owner Rejected'), 

 

AND( 

 

TEXT(PRIORVALUE(Status__c)) = 'Budget Line Owner Rejected', 

 

TEXT(Status__c)='Pending Budget Line Owner Review') 

 

 

 

)

 

 
2 respuestas
  1. 13 nov 2018, 18:28
    Thanks Deepak.

     

    It is not letting user save the record, giving the validation error.
0/9000