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
Jennifer DunneJennifer Dunne 

Validation Rule to allow only specific Profile to edit record

Hi, 
I need help with my validation rule.  I need to allow only the 'Intake' profile to edit a record 'status' field when another field 'contact type' = 'Intake' .  So far I have below, but it's not working. 

 
AND
(ISCHANGED(enrtcr__Status__c),
NOT(mntrs_Contact_Type_derived__c = "Intake"),
 $Profile.Name = "Intake")
Best Answer chosen by Jennifer Dunne
Maharajan CMaharajan C
Hi Jennifer,

Try the below one:

AND
(ISCHANGED(enrtcr__Status__c),
mntrs_Contact_Type_derived__c = "Intake",
$Profile.Name <>  "Intake")


If mntrs_Contact_Type_derived__c is picklist field then use the TEXT(mntrs_Contact_Type_derived__c) = "Intake"

Thanks,
Maharajan.C

All Answers

Maharajan CMaharajan C
Hi Jennifer,

Try the below one:

AND
(ISCHANGED(enrtcr__Status__c),
mntrs_Contact_Type_derived__c = "Intake",
$Profile.Name <>  "Intake")


If mntrs_Contact_Type_derived__c is picklist field then use the TEXT(mntrs_Contact_Type_derived__c) = "Intake"

Thanks,
Maharajan.C
This was selected as the best answer
Jennifer DunneJennifer Dunne
Thanks Maharajan.  That worked, I did think it was to do with my NOT statement.  And the contact type is a formula field text, so all good. Thank you.