Skip to main content
All CollectionsTroubleshootingComparisons
Troubleshooting deployments made via Compare and deploy
Troubleshooting deployments made via Compare and deploy

A step-by-step guide to troubleshoot common issues on a manual deployment made via Compare and deploy feature

Dario Messina avatar
Written by Dario Messina
Updated over 2 months ago

Is your deployment showing as successful in Gearset but not displaying what you expected in the target org? If so, this article may help you identify and resolve common problems that may arise during manual deployments made via Compare and deploy.

Note: If you're having issues with CI job deployments, please refer to this article:
Troubleshooting continuous integration (CI) jobs

If the deployment is showing a validation error, feel free to check out our ever-growing section on Salesforce validation errors, as well as our guide on how to replicate deployment and/or validation errors.

Step 1: Check if the metadata item is included in the Deployment Package

Sometimes we make big deployments and we forget to check the list of the deployed items, but in reality it's a good practice to double check that the specific item we expected to show up in the target has made it through the deployment successfully.

How?

Navigate to the Deployment history to be able to either check the list on View details > View comparison (this allows you to check all the retrieved items), or even better by downloading the Deployment package zip file (this is to re-confirm that your metadata item/component made it to the final deployment package).

Note: If you need more guidance on how to navigate through the deployment history in Gearset, check this article: Metadata deployment history.

If the item is in the package, and the deployment was successful, this means that you should be able to find this item in your target (make sure you are looking at the correct Salesforce org).

The litmus (decisive) test would be to make a new comparison using Gearset to compare the same source and target environments (orgs) and confirm if the same item that was originally selected for deployment (previously identified as New or Changed in the comparison) is now showing up as No difference.

If this is not the case, and the item is showing up as either New or Changed, then let's proceed the investigation with Step 2.

Step 2: Check if the item is included in the Metadata filter

Having established that the metadata in question hasn't been deployed (and/or was not added to the deployment package), we can now move onto discovering why things didn't work out as intended.

The most frequent reason is that the item is missing in the comparison as well.

In fact, in order for Gearset to be able to deploy a given metadata item, Gearset needs to first be able to retrieve that item in the comparison.

The way Gearset retrieves metadata items in the comparisons is by using the Salesforce Metadata API.

And the way we choose which metadata type and which item is to be retrieved for the comparison is via the metadata filer. You can read more about our metadata filters in custom metadata filters in Compare and deploy.

So it's time to check that the metadata filter allows Gearset to retrieve what we want to deploy.

How?

On the Deployment history page in the app, click View comparison. After the comparison has finished loading, how you found the item you were trying to deploy?

If so, try to right click on the item and select one of these three options:

  • Fetch latest to refresh that specific item to bring the latest updates from the source environment

  • Fetch latest for selected item (select this if you've ticked more that one metadata component to refresh metadata of all of the selected components)

  • Alternatively, you can also opt for selecting the blue button: - this refreshes all the retrieved metadata types (based on the metadata filter used in the comparison).

You can also right click on the metadata type (menu on the left) and select either:

  • Quick refresh to refreshes changes since the last comparison for that particular metadata type, or

  • Full refresh to refresh all changes from your org for that particular metadata type (e.g. Custom object on example below).

Note: Check this article to find out more about refreshing metadata in Compare and deploy.

Common things to check out:

  • If the item is related to a managed package, then include the managed package in the filter. Check this article for more guidance: Comparing managed package metadata with Gearset.

  • If the managed package is already included in the filter, it may be worth it to check this section on the prerequisites for managed package metadata to appear in your comparison results.

  • In the central section of the filter, for a given metadata type, you want to make sure the item you are looking for is included on that list in case you have that set up as Specify named items and rules. If you are unsure about that configuration, we recommend to set it to All items from source and target.

Note: Still cannot find your item? Please have a look here in case you are searching for a metadata within your source control: Common problems with viewing metadata in source control, or or here to reproduce it with Workbench.

Once you've properly set up your filter, you can re-run the comparison by clicking Update comparison button at bottom of the Edit filter page (see above screenshot).

Knowing the API name of the item you are looking for will make the search very easy by using the filter on the top right corner of your comparison.

For example, below we've identified a PendingServiceRouting Custom object simply by adding its API name in the 'Search' filter.

There is a chance you have this item already selected in your comparison. If that's the case, let's move onto the step 3.

Step 3: Check if the Problem Analyzer stripped out the item

Sometimes it may be the case that the problem analyzer is removing one or more items from the deployment, before the the package is built for deployment.

Once you made your selections and clicked on Next from your comparison screen, you can have full visibility of the warnings and problem analysis fixes.

If the section Issues with automatic fixes is flagging anything, select View all to check if Problem Analyzers have excluded the item(s) from the deployment package that you were aiming to deploy.

Under the necessary assumption, sometimes, the problem analyzer may suggest to remove the item to increase the chance of having a successful deployment.

A typical example is this problem analyzer, which will remove references to the objects that are not in the target, to make the deployment more likely to succeed.

However, once you established this is the cause of your item not being deployed, and if you are sure that those objects are indeed in the target, you may want to decide to not accept the suggestions and to not remove the items (by unticking the checkboxes), therefore adding the items to the deployment package.

Note: You can learn more about our problem analyzers from this article: An introduction to Gearset's problem analyzers.

And to understand how to customise your own problem analyzer, check this article: Problem analyzer templates.

What to do if the above information didn't resolve your issue?

Are you still unsure? Want our support team to take a look and help you out?

Please, feel free to reach out to anytime via the in-app chat and share the comparison with us!

Did this answer your question?