function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FilikinFilikin 

Upgrade package permissions

Hi,
I am trying to get my head around what happens to permissions when I upgrade a package.
I install my package, select "Install for all users" and after the package is installed, I customise the user's profiles to give them the level I access they require.
Then I produce a new version of the package, go back to the customer's org and upgrade the package.
If I select "Install for all Users" will this overwrite the customisations I made to the user's profiles and give everyone access to everything?
If so, should I select "Install for Admins Only" when doing the upgrade?
 
Best Answer chosen by Filikin
SandhyaSandhya (Salesforce Developers) 

Profile settings are editable but not upgradeable. After upgrading, update the profile settings for any custom objects included in the package. The developer can make changes to profile settings after releasing them, but those changes will not be included in an upgrade. However, changes made to permission sets are included in the upgrade for any permission sets that were included in the package.So As per my knowledge profiles will not be upgraded.

Thanks 
Sandhya

 

All Answers

SandhyaSandhya (Salesforce Developers) 
Hi,

By checking the documentation, you can see that permission sets are upgradeable. This means that, as long as your permission set is in your package, it will gain all new permissions specified in your package ("permission sets will be overwritten along with all permissions"). Once you have deleted the permission set from your package, it will remain in the subscriber's org until they (a) uninstall your package, or (b) delete it themselves.

Please refer below links for the same.
https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/packaging_packageable_components.htm

http://salesforce.stackexchange.com/questions/105111/permission-set-part-of-managed-package-are-overwritten-when-we-upgrade-package
 
https://help.salesforce.com/articleView?id=distribution_perm_sets_profile_settings.htm&language=en_US&type=0
 
Hope this helps you!

If this helps you, please mark it as solved.

Thanks and Regards
Sandhya
FilikinFilikin
Hi Sandhya, thanks for the reply, but my issue isn't with permission sets - it is with the permissions applied via the profiles. Say I have a custom object Referral in my package and a field Date of Referral. I install the package with the Install for all Users option. Then I go to a user's profile (in this case the Counsellor profile) and I remove the edit permission from Date of Referral, so that Counsellors can see the date of referral, but cannot edit it. If I then upgrade the package and again select "Install for all Users" - does this reset the permission on the Date of Referral field? regards, Eamon Eamon Kelly Senior Developer [logo] Phone: +353 1 6535099 Website: www.enclude.ie Drumcondra Business Centre, 120 Drumcondra Road Upper, Dublin 9 CHY: 17286 CRA: 20064006 Communities of Practice Tech Donations Training Cloud Solutions
SandhyaSandhya (Salesforce Developers) 

Profile settings are editable but not upgradeable. After upgrading, update the profile settings for any custom objects included in the package. The developer can make changes to profile settings after releasing them, but those changes will not be included in an upgrade. However, changes made to permission sets are included in the upgrade for any permission sets that were included in the package.So As per my knowledge profiles will not be upgraded.

Thanks 
Sandhya

 
This was selected as the best answer
FilikinFilikin
Thanks Sandhya