I am studying managed package and the package lifecycle is the client's org. I am a little confused. Say, I push upgrade a major update of an app that is installed in the client org. Will the customer customizations to that app(Such as which fields are showing in the Account list view, a new record type of a custom object, and its layout assignment) will be overwritten by the updated package?


What can and cannot be included in both 1GP and 2GP packages is covered in the metadata coverage report. In addition, you can find out what packaged metadata is upgradeable in the managed package components documentation.

Given these two sources of documentation, you can see that:

  1. Layouts are not upgradeable; when the package is first installed any contained layouts are installed. However, on upgrade of the package the layouts are ignored. The reason for this is to avoid breaking any customization of these layouts applied on the subscriber org after the package's initial installation. Your package would need to include manual update instructions as part of the release, or you need to include new layouts or you can try to have your post install script use the Apex metadata API to update the layouts programmatically.
  2. Profiles can be included in managed packages, but I'm not sure they are upgradeable (not something I've tried and it isn't officially documented). Alternatively you can do this using Permission Sets which are definitely upgradeable. This is likely where you'd do your record type mappings.
  3. I don't believe page layout assignments can be packaged.

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.