Skip to main content

Running into a permission-based issue and was wondering if anyone had a workaround. We’re designing pages with all our Profiles in mind and are looking to display relevant information based on the running user’s profile Id.

The problem is that user’s are unable to see the Profile ID thus the page renders like that condition didn’t exist. So for an opportunity model, Owner.Profile.Name = (userinfo) Profile Name will only work if the person logged in has edit abilities on profiles.

Letting all our user’s edit profiles is something we’re not looking to do. So i’m hoping there’s just a better way to do this. Even a user-model with ProfileId = (userinfo) Profile ID won’t work for users.

Solution: Creating a formula field referencing the ProfileID allows any user to view the ProfileID without having profile access.

So instead of ProfileId = (userinfo) ProfileId ; Profile_Id__c = (userinfo) ProfileId

Now you could create a custom Profile_Id__c field for each object you’re going to use this on
or
Create Profile_Id__c on the User object. And on every page needing this have a User model with the condition above, and for any subsequent models, use OwnerId in the set of values {Field From Another Model} “User Model With Profile_Id__c Condition”(Id)

I’m going to leave this out there for anyone who might experience this in the future. For me i’ll be adding Profile_Id__c to all standard and custom objects instead of building a model on each page. 



Reply