Skip to main content
Jack Jack (Atlassian) 님이 #Validation에 질문했습니다

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개
  1. 2023년 9월 6일 오전 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