You need to sign in to do that
Don't have an account?
SazEast
Validation rule firing when it shouldn't
Hello,
Users are getting a validation error on records that are excluded from the validation rule. It should only fire for the three user profiles mentioned, and only fire if the approval status is set to 'Approved' if it was not already set to this. It also shouldn't fire if the record type is an invoice adjustment. Any ideas why this isn't working?
Thanks
Users are getting a validation error on records that are excluded from the validation rule. It should only fire for the three user profiles mentioned, and only fire if the approval status is set to 'Approved' if it was not already set to this. It also shouldn't fire if the record type is an invoice adjustment. Any ideas why this isn't working?
CONTAINS($Profile.Name, "Cash") || CONTAINS($Profile.Name, "RBC") || CONTAINS($Profile.Name, "Accounts Payable") && ISPICKVAL(Approval_Status__c, "Approved") && NOT(ISPICKVAL(PRIORVALUE(Approval_Status__c), "Approved") ) && RecordType.Name <> "Invoice_Adjustment"
Thanks
Please try this:
AND(
OR(
$Profile.Name <> 'Cash',
$Profile.Name <> 'RBC',
$Profile.Name <> 'Accounts Payable'
),
TEXT(Approval_Status__c) = 'Approved',
TEXT(PRIORVALUE(Approval_Status__c)) = 'Approved',
RecordType.Name <> "Invoice_Adjustment"
)
All Answers
Please try this:
AND(
OR(
$Profile.Name <> 'Cash',
$Profile.Name <> 'RBC',
$Profile.Name <> 'Accounts Payable'
),
TEXT(Approval_Status__c) = 'Approved',
TEXT(PRIORVALUE(Approval_Status__c)) = 'Approved',
RecordType.Name <> "Invoice_Adjustment"
)