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
Jonathan Wolff 7Jonathan Wolff 7 

Change Validation rule so it does not work for certain Profile

Hello, I made a validation rule in Content Version that blocks the changing of document details that have the value "Vertragsdokument" etc. in the field Dokumentenklasse which is a picklist in Content Version. Now I created a Profile which I named "Document Deleter"
I want my validation rule to work for every profile except this one. Could you tell me how to change my code to make this possible?

My Trigger:

AND(
 
       NOT(ISNEW()),
OR(
       Text( PRIORVALUE(Dokumentenklasse__c)) = "Geschäftsbrief",
       Text( PRIORVALUE(Dokumentenklasse__c)) = "Vertragsdokument",
       Text( PRIORVALUE(Dokumentenklasse__c)) =  "Wichtige Dokumentation oder Entscheidung",
 Text( PRIORVALUE(Dokumentenklasse__c)) =  "Druckstück"
)
)
Dushyant SonwarDushyant Sonwar

Jonathan,

Try this

 

AND(
 
       NOT(ISNEW()), 
$Profile.Name != 'Document Deleter',  OR(
       Text( PRIORVALUE(Dokumentenklasse__c)) = "Geschäftsbrief",
       Text( PRIORVALUE(Dokumentenklasse__c)) = "Vertragsdokument",
       Text( PRIORVALUE(Dokumentenklasse__c)) =  "Wichtige Dokumentation oder Entscheidung",
 Text( PRIORVALUE(Dokumentenklasse__c)) =  "Druckstück"
)
)