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
SRV-StephanieSRV-Stephanie 

Validation Rule

I am working on a validation rule that says if the agreement record type is locked and if the user profile is not system admin or contract department then product error. Below is what I have tried, any help would be appreciated.

 

Thanks!

 

AND(
OR(
( AgreementId__r.RecordTypeId, "01I40000000EnhV"),
NOT( $Profile.Id,  "00e40000000jjdK")),
($Profile.Id,"00e40000000jjUh"))

Steve :-/Steve :-/

Personally I hate using Profile ID or User ID, or RecordType ID in formulas, I'd rather use $Profile.Name, etc...

 

Anyway to each his own, try this ->

AND(
AgreementId__r.RecordTypeId = "01I40000000EnhV",
$Profile.Id <>  "00e40000000jjdK",
$Profile.Id <> "00e40000000jjUh")