Skip to main content

I have updated my below validation rule not triggere when the record type is business.

 

But it is not working.

 

Can anyone please check this validation rule and let me know what I should change here to work .

 

!$Setup.Rule_Bypass__c.Disable_Validation_Rules__c && ($UserRole.Name<>"Administration") && ( (Created_from_Lead__c = FALSE && (ISBLANK( ShippingStreet) || ISBLANK(ShippingCity) || ISBLANK(ShippingCountry))) || (ISCHANGED( ShippingStreet)|| ISCHANGED(ShippingCity) || ISCHANGED(ShippingCountry)) && (ISBLANK( ShippingStreet) || ISBLANK(ShippingCity) || ISBLANK(ShippingCountry)) && NOT ( RecordType.DeveloperName = "Business" ) )

 

#Trailhead Challenges #Salesforce Developer #Flow #Trailhead #Validation Rule

6 respuestas
  1. 6 sept 2023, 11:51

    @Jack Jack can you try adding ISNEW() to the validation rule and see? you can possibly trim your validation rule as below

     

    AND (

    ISNEW(),

    !$Setup.Rule_Bypass__c.Disable_Validation_Rules__c,

    ($UserRole.Name<>"Administration"),

    NOT(Created_from_Lead__c),

    OR(

    ISBLANK( ShippingStreet), ISBLANK(ShippingCity), ISBLANK(ShippingCountry)),

    NOT(Recordtype.Name = "Business")

    )

     

    Looking at your past response.. above rule is what i understand as the approach

0/9000