Loading

Limitations for Deploying Profiles with Packages

Data pubblicazione: Jun 26, 2023
Descrizione
Although the Metadata Coverage documentation states that the Profile object is supported, Profiles in Packages have special behavior during Package installation. When installing a Package containing Profiles, the Profile itself will never be installed directly in the target org but the behavior differs based on how the package is installed.
Risoluzione
UI Package Installation

During installation of a package in the UI via the install link, you're given options on which Users to install the package for. If the "Install for Specific Profiles" option is used, you're given the option to map the values of the packaged Profile into a Profile that already exists in the target org. This behavior is discussed in the documentation for installing packages and the values that can be mapped to existing Profiles are listed here. When selecting either the "Install for Admins Only" or the "Install for All Users" option the Profiles in the package will not be used.

CLI Package Installation

The CLI package installation command (force:package:install) only supports the "Install for Admins Only" and "Install for All Users" options. Since the UI installer must be used for the "Install for Specific Profiles" option, automation for mapping packaged Profile values is not currently possible. The CLI install command above will default to the "Install for Admins Only" option, but the "securitytype" parameter can be used to specify the "Install for All Users" option. 

Note for CLI Package Creation: When creating a package version using the Salesforce CLI, any properties in the included Profiles that are not related to the packaged metadata are removed. 

Additional Details
  • A workaround option would be to utilize Permission Sets for managing access as part of a Package. 
  • "Install for Admins Only" means that only the System Administrator Profile gets full CRUD access to packaged metadata such as Custom Objects or Tabs .
  • "Install for All Users" is the same as above, except it gets applied to all Profiles in the subscriber org. An important note is that CRUD access to Custom Objects is only granted for the System Administrator Profile.



 
Numero articolo Knowledge

000380781

 
Caricamento
Salesforce Help | Article