Control Access to Fields
Modify Field-Level Security
In some cases, you want users to have access to an object, but limit their access to individual fields in that object. Field-level security settings—or field permissions—control whether a user can see, edit, and delete the value for a particular field on an object. These are the settings that allow us to protect sensitive fields such as a candidate's social security number without having to hide the candidate object.
Unlike page layouts, which only control the visibility of fields on detail and edit pages, field-level security controls the visibility of fields in any part of the app, including related lists, list views, reports, and search results. In fact, to make absolutely sure that a user can't access a particular field, it's important to use the field-level security page for a given object to restrict access to the field. There are simply no other shortcuts that provide the same level of protection for a particular field.
- Position object—hide minimum and maximum pay from standard employees and interviewers.
- Candidate object—hide social security numbers from hiring managers and interviewers.
- Job Application object—make the Position and Candidate lookup fields read-only for hiring managers.
Field settings can be applied either by modifying profiles or permission sets or from the Field Accessibility menu in Setup.
- Create page layouts to organize the fields on detail and edit pages.
- Verify users’ access to fields by checking the field accessibility.
- Customize search layouts to set the fields that display in search results, in lookup dialog search results, and in the key lists on tab home pages.
Restrict Field Access with a Profile
- Use the Quick Find box to find Profiles in Setup.
- Select the profile you want to change. "Standard User" will do nicely.
- Click Object Settings and select the object for which you want to update the field settings.
- Click Edit.
- For each field, specify the kind of access you want for users with this profile, and save your settings.
Add Field Access with a Permission Set
We worked with Permission Sets when we set up our custom objects. Now we'll go back to that Setup page to make sure the right fields in one or our objects are available to the users who need them.
- In Setup, use the Quick Find box to find Permission Sets.
- Select a permission set and click Object Settings.
Click the object you're working with, then click
In this example, we're modifying the Candidate object.
Under Field Permissions, specify the kinds of access
your interviewers need, then save this permission set.
See how we've enabled our interviewers to both read and change the values of the Apex and C# checkboxes? Now they can check or uncheck those boxes when they’ve determined the candidate’s command of those skills. We’ve prevented them from changing the Hire By date or the name of the hiring manager, but they can see that information. And they don’t need to know the pay rate for the position, so we’ve removed both their Read and Edit access for those fields.
- Click Manage Assignments and select the users who you expect to need the permissions you’ve just specified. Click Add Assignments and Done, and you're done!