Gearset fully supports the comparing and deploying of changes to managed package metadata in your Salesforce and version control environments.
Including managed package metadata in your comparisons
The Default comparison
metadata filter doesn't include managed package metadata. To ensure managed package metadata appears in the Gearset comparison results, you should use a different metadata filter:
There are two ways to do this: selecting the Compare all
preset filter, or creating your own custom filter.
Option 1: Using the 'Compare all' filter
The Compare all
filter will include all namespaces and all metadata types (which includes the Installed package
metadata type, as discussed later in this article):
To use this filter, simply select Compare all
from the comparison filter drop-down, and start your comparison:
Tip: If you have large orgs or many installed packages, then using the Compare all
filter can make the comparison process slower, as Gearset needs to retrieve a larger volume of metadata. For a faster comparison, follow option 2 below.
Option 2: Create your own custom metadata filter
Creating a custom filter allows you to specify which namespaces you want to retrieve. It also lets you customize the metadata types to include in your comparison. Excluding the metadata types that you aren't interested in deploying will speed up comparison times and reduce the noise in your comparison results.
From the Compare and deploy page, open the Metadata comparison filter
drop-down and select Manage custom filters...
. Choose the metadata types you want to include in your filter from the list on the left-hand side. Unchecking the box next to each type will remove that type from your filter.
In the Include managed packages
section on the right-hand side, select Choose
. You can then add the namespaces for any packages you want to compare:
Tip: If you have already selected a source and/or target org on the Compare and deploy page before you open the custom filters dialogue, Gearset will suggest the namespaces of any packages installed in your orgs. You can quickly add them to your filter by clicking the + sign next to them:
If you want to include all packages in your org, you can alternatively set this option to All
:
For more about custom metadata filters, see our support article.
Managed package metadata in version control
If you’re comparing metadata in source control, Gearset may not be able to identify when metadata is part of a managed package, and so it may appear in the results, even if the None
button is selected in the metadata filter.
Prerequisites for managed package metadata to appear in your comparison results
Whether or not the Installed package
metadata type is included in the metadata comparison filter can affect whether managed package metadata is shown in the comparison results.
Option 1
If you have the Installed package
metadata type selected in the comparison filter, you will need to make sure that your managed package is:
Installed in both source and target
The same package version in both source and target.
The metadata may be hidden from the comparison results if these conditions are not met, because a detected difference might be due to a version difference rather than a user customization.
Note: The installed package file itself will show, even if the above conditions are not met.
Tip: If you need to change the Managed Package Version for an Apex Class, this page has some useful hints and tips.
Option 2
If the Installed package
metadata type is not included in the metadata filter, Gearset cannot tell the version of the managed package, and will show the metadata even if the versions are different or the managed package is not present in both source and target. This is therefore a workaround for the two requirements above.
Viewing managed package components in comparison results
Now that you've included the packages you want to compare in the metadata filter, click COMPARE NOW
. In the comparison results, you'll now see any associated changes for those packages.
These can be selected and deployed just like any other metadata component type. You can search for them by entering the namespace prefix into the filter box in the top right of the table:
The Installed package
file itself will also appear as an item in the comparison results. Selecting and deploying the package files will trigger the package to be installed in the target environment, or updated to the later version if there is a version difference.
If you can't find a customization you've made to a piece of metadata in a managed package, then you should filter the results for Installed package
, and check if the package is installed in both orgs and is the same version.