With the Summer '17* release in API version 40.0 and greater, when you retrieve permission set metadata, all metadata API exposed contents for the permission set(s) are retrieved. Retrieval includes Apex associated with the permission set, CRUD, and so forth.
In API version 39.0 and earlier, retrieving permission set metadata returns only app and system permissions that are assigned to the permission set. Junction metadata (such as Apex, CRUD) are only included if the metadata for the related component is also included in the package definition.
*Currently targeted June 2017, but subject to change
Need to investigate if retrieval of PermissionSets can be simplified, currently PermissionSets are retrieved in batches, one retrieve call for each of the following metadata components:
ApexClass
ApexPage
CustomApplication
CustomObject
CustomObjectTranslation
CustomPermission
CustomTab
ExternalDataSource
Layout
Each retrieve only downloads a partial view of the PermissionSet, when all data is retrieved a post processing step merges these back together to create the complete PermissionSet metadata file.
Based on the description of the upcoming change it seems like all the metadata can be gathered in one retrieve call and no post XML merging would be required.
Need to investigate if retrieval of
PermissionSets
can be simplified, currentlyPermissionSets
are retrieved in batches, one retrieve call for each of the following metadata components:ApexClass
ApexPage
CustomApplication
CustomObject
CustomObjectTranslation
CustomPermission
CustomTab
ExternalDataSource
Layout
Each retrieve only downloads a partial view of the
PermissionSet
, when all data is retrieved a post processing step merges these back together to create the completePermissionSet
metadata file.Based on the description of the upcoming change it seems like all the metadata can be gathered in one retrieve call and no post XML merging would be required.