Skip to main content
Nadav Mozes (Malam) 님이 #Validation Rules에 질문했습니다

Hi all,

 

I`m trying to create a validation rule for a specific role that he will the only one who can edit the account record (based on a value from picklist)

 

I got this so far- 

(ISNEW() || ISCHANGED( Landing_page__c ) || ISCHANGED( P_P_NDA_Eligible_Cohort__c ) ||ISCHANGED(P_P_account_status__c)) && ISPICKVAL( P_P_account_status__c ,"Ready to engage practices") &&  $User.UserRoleId   <> "00E1r000001uoeY"  && (ISBLANK(Landing_page__c) || ISBLANK(P_P_NDA_Eligible_Cohort__c))

 

Those are the instructions-

  • The following fields should be mandatory in order to change the value to “Ready to engage practices”
    • Landing page
    • P&P - NDA Eligible cohort
  • Owner should be with role “Customer Success”

The problem is that it seems like its working the other way around, when my user role isnt customer success the validation rule pops up for the fields to be filled but doesnt prevent me the editing from the first place which im not in the correct role, when im changing to customer success i can edit the record no matter what, even when im choosing the picklist value Ready to engage practices the fields Landing page and pp nda can stay blank, which the validation rule says the opposite...

 

What am i missing?

 

Thanks,

#Validation Rule #Validation Rules #User Roles

답변 7개
  1. 2021년 11월 9일 오전 8:19

    OR(

    AND(

    OR(

    ISNEW() ,

    ISCHANGED( Landing_page__c ),

    ISCHANGED( P_P_NDA_Eligible_Cohort__c ) ,

    ISCHANGED(P_P_account_status__c)

    ),

    ISPICKVAL( P_P_account_status__c ,"Ready to engage practices") ,

    $User.UserRoleId <> "00E1r000001uoeY" ,

    OR(

    ISBLANK(Landing_page__c) ,

    ISBLANK(P_P_NDA_Eligible_Cohort__c)

    )

    ),

    AND(

    ISPICKVAL( P_P_account_status__c ,"Ready to engage practices") ,

    $User.UserRoleId = "00E1r000001uoeY" ,

    OR(

    ISBLANK(Landing_page__c) ,

    ISBLANK(P_P_NDA_Eligible_Cohort__c)

    )

    )

    )

0/9000