Skip to main content

What I am trying to do is - whenever a User goes to create an Account and they have a certain Role ID - to error out and not let them create it. 

 

However, when I log in as that User, they can create the Account. What is the issue with the VR: 

 

AND( 

ISNEW(), 

OR(($

User.Id = "00E4N000000KnsmUAC"), ($User.Id

= "00E4N000000KnsnUAC")), 

NOT(Bypass_Validation__c)) 

&& NOT( $Setup.Validation_Bypass__c.Validation_Bypass_Custom_Setting__c ) 

&& NOT( CONTAINS($User.FirstName, 'API')) 

&& NOT( CONTAINS($User.FirstName, 'B2BMA')) 

/* Automated Process user */ 

&& NOT( CONTAINS($User.FirstName, 'Automated') && CONTAINS($User.LastName, 'Process'))

5 risposte
  1. 29 gen 2025, 19:06

    Also, don't mix AND OR with && || in the same Formula.  The syntax is not the same, and it's just plain confusing to read.  Just pick one and stick with it throughout the Formula  

0/9000