Skip to main content

A simple validation rule is not triggering, can anybody tell me why? It is supposed to be that if a record is a certain record type and the Agent field is not populated the user can't save the record:

 

AND(

ISPICKVAL(Business_Unit__c, 'UCS'),

OR(

RecordTypeId = '0126A000000NdNfQAK',

RecordTypeId = '0126A000000NdNgQAK'),

ISBLANK(Agent__c))

2 answers
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    Aug 11, 2023, 3:35 PM

    Hi Carl,

     

    Validation rules take the 15 character Ids, you are using the 18 character Id.

    Having said that, hard-coding Ids is a bad practice, use RecordType.DeveloperName instead

0/9000