2

My aim is to create a formula field on user object which validates that a user has been assigned to a particular permission set or not.

Step1: I created a custom permission called New_Custom_Permission

Step2: I created a new permission set called New_Custom_Permission_Set and added the above custom permission to this permission Set.

Step3: I assigned a user John to New_Custom_Permission_Set

Step4: I created a formula field of boolean type on user object called "Check Permission" which refers to $Permision.New_Custom_Permission

enter image description here

I expect the value of CheckPermission formula field on John user record as true but it is returning false. What is wrong with my approach here?

9
  • can you post your formula code – Santanu Boral Jun 5 '17 at 18:18
  • I added my formula field image. It is just $Permision.New_Custom_Permission and return type is boolean – sam_s Jun 5 '17 at 18:22
  • 1
    $Permision.New_Custom_Permission will show current logged in user's persmission? – night crawler Jun 5 '17 at 18:26
  • @SarathGarimella you should post this as answer – Santanu Boral Jun 5 '17 at 18:29
  • @SarathGarimella oh, so it won't work based on the user record then? – sam_s Jun 5 '17 at 18:31
2

I just duplicated this. I created the custom permission, assigned to a permission set, and then created a boolean formula field with the syntax:

$Permission.Dan_Permission

The formula result on the record were false.

I assigned the permission set to myself as $ is current user.

The formula results to true.

So in this use case I think you should adjust your approach to check the current user is not an assigned user such as createdby or owner.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.