1

We have a Custom Field (Formula) on User object which has a simple formula to set the checkbox True if the user's profile is System Administrator.

enter image description here

But here i have a user with different profile with the Super User checkbox set to true.enter image description here

I looked at all other users as well where the checkbox is set to true even though they different profiles.

I found this Similar Issue but our default language is English.

Does anyone have any idea on how to get this working or get current user's profile in a formula field if this doesn't work?

2

$Profile is the global variable for the profile of the user that is currently logged in. It allows you to to customize formulas to the profile of the user looking at the field. See: Salesforce global variable documentation for more information. You see the formula return true on every user record because you are a system administrator, and therefore your profile name is used for the comparison.

What you would want is the profile name of the user record. This would be Profile.Name (without the dollar sign).

|improve this answer|||||
  • 1
    Well, that makes sense how another formula field which has reference to Super User field worked when it had Super_User__c = FALSE but i was seeing it as TRUE being a System Admin. You saved me a lot of time. Thank you very much! – SunnyG Nov 8 '19 at 19:44
  • @SunnyG Happy to help! – Kasper Nov 8 '19 at 19:47
0

I just used Profile.Name = "System Administrator" instead of $profile. it works fine for me

|improve this answer|||||

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.