Skip to main content
Luke Chuter 님이 #Formulas에 질문했습니다

Hi all. In need of some help! I'm looking for a validation rule so that only users on 'Sport Team' profile can only edit fields when checkbox 'Athlete = TRUE'. The fields they should be able to edit are :  Name, contact details, email, phone, Summer or Winter Sport (Picklist), Sport 1 or Sport 2 (Picklist). users on other profiles should not be able to edit the above fields but can edit the fields not specified.

 

I currently have the forumula 

AND(

$Profile.Name <> 'Sport Team',

   NOT(ISNEW()),

   PRIORVALUE(Athlete__c) = TRUE

)

But this locks the whole record rather than just specific fields.

 

Any help would be greatly appreciated!

Thanks

답변 3개
  1. 2022년 11월 21일 오후 5:20

    Hi @Luke Chuter

     

    You need to try something like this...

    AND (    $Profile.Name <> 'Sport Team', 

                   Athlete__c = TRUE,

                   !ISCHANGED (Athelete__c),

                  OR  (ISCHANGED (email ) , ISCHANGED (phone)... )

             )

     

    What the above rule does is that to raise an error, when

    profile is other than 'sport team' & athlete flag is true and any of these fields have changed

     

    if profile is sport team OR athelete flag is false, changing these values do not raise an error.     

     

    Regards,

    Kannan

0/9000