Skip to main content Take our 5-minute Community Survey. Open now through 4/11/2025. Click here to participate.
Usecase: Fire validation rule if the value in the Custom field  (Is_Batch_Excluded__c) of a cutom setting (API_Adminstration__c) is True for a particular user. 

 

Validation Rule Used:

 

AND(

 

$Setup.API_Adminstration__c.Is_Batch_Excluded__c,

 

$User.Id ="0050L000009FABcQAO"

 

)

 

Issue:

 

Validation rule is not firing when using $user.id is used but firing $User.ProfileId (same profile of the user) is used. 

 

// With User.Id 

 

AND(

 

$Setup.API_Adminstration__c.Is_Batch_Excluded__c,

 

$User.Id ="0050L000009FABcQAO"

 

)

 

//With ProfileId

 

AND(

 

$Setup.Sumo_API_Adminstration__c.Is_Batch_Excluded__c,

 

$User.ProfileId ="00eE0000000m2zX"

 

)

 

Please help
3 answers
  1. May 13, 2020, 4:27 PM

    Validation rules doesn't work with 18 digit IDs(onnly 15 digit ID), so use this:

    AND(

    $Setup.API_Adminstration__c.Is_Batch_Excluded__c,

    $User.Id ="0050L000009FABc"

    )

     

     
Loading
0/9000