1

I searched for a while on Google and in here, but couldn't find an answer to my issue.

I'm making an app just for testing, but I need to have a "General Employee" profile and a "Director" profile. Both of them can create "Position" objects, and the object has 2 record types: "Default" and "Internal". Also, the object has two salary fields (min and max salary).

I want to make sure the Director can see the salaries of both Default and Internal positions, but the General Employee can not see the fields if the record is of "Internal" type.

How can I do this? I've been spending almost 2 hours messing with permission sets, profiles, page layouts, and couldn't make this happen.

1
  • This smacks of job interview material. Can you disclose if this question pertains to a job application?
    – Adrian Larson
    Mar 26, 2015 at 23:31

3 Answers 3

1

You can create 2 page layouts, i.e. Position Internal and Position General.
On General page layout you can hide salary field. Then you can assign General page layout to specified record type for specified profile (in your example Position General layout to General Employee profile).
But you must know that your General User can still see salary field in API or reports.
Look here

1
  • Funny thing is, I didn't wait for an answer in here. Right after typing the question, I did it this way, and to my surprise, it worked pretty well. Mar 27, 2015 at 9:26
1

In your scenario you cannot use Field level security because you want to show hide value on basis of other field.

I would suggest to use Formula field which will derive value from actual field and check if Profile is valid then show value else show '****'

Just for your information, it will hide value from UI however that profile can still access that value from dataloader or any other API tool.

1
  • 2
    That is a nice approach, indeed. I didn't knew I could use a formula to filter by profiles. I'm definitely going to try this. Mar 27, 2015 at 9:26
1

Field level security on profiles and permission sets can only control access based on the object, not per record type. (There's an idea to support this on IdeaExchange.)

If it's really important to prevent General Employee users from seeing salary information on Internal positions, you must disallow access to the Min Salary and Max Salary fields completely through field level security on the profile. Otherwise they will be able to see these values in reports and list views, as well as through the API. Hiding fields on the page layout is not a secure way to prevent access.

2
  • However, if I disable those fields for them in the position object, they won't be able to see the "normal" positions either. Mar 27, 2015 at 9:27
  • No, they will not. My point is that there is no way to securely hide them in one record type but not the other. Any UI-level hiding will not be secure, as the information can still be accessed at any time in a report or list view. Mar 27, 2015 at 17:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .