1

I have added a new field to the User object and provided field level security for the System admin object. I'm also creating a new permission set in which I provide access to this new field for the User object.

PermissionSet->Object Settings -> User -> Field visibility checkbox.

After deployment, I get an insufficient access for this field in the apex code.

I checked the value of User[newfield] in the permission set on the deployed instance and it shows the correct permissions. However, the system admin profile does not have the permission settings for this object. Am I missing something? Do I need to explicitly assign the permission set to the system admin profile on the deployed instance?

0

If you deploy through change set and do not add any profiles in that change set, then the respective users will not get access to that field.

Normally the permission set follows the same thing.

As a post deployment process, you should manually add permission set to the respective System Admin users.

Update based on your comments

If you want to package it into a managed package, then also permission set doesn't include user permissions.

You must assign permission sets after installation.

For more information refer Permission Sets and Profile Settings in Packages

  • Thanks for that info. I'm planning to package it in a managed app. Is the process same for it as well i.e. I would have to add permission set to the system admin users after installing the app? That does not seem right. – gerad26 Mar 13 '17 at 18:40
  • I have updated my answer based on your comments. If that serves your purpose then accept this. – Santanu Boral Mar 13 '17 at 18:47
  • Thanks for the link. That helps. Could you clarify that if I want to give access to system admins I would have to package profile settings for system admin. Is that the standard practice for a managed package? – gerad26 Mar 13 '17 at 18:52
  • you can do that also – Santanu Boral Mar 13 '17 at 18:54

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.