Are you comparingĀ 

  • between a git branch and a Salesforce org, andĀ 

  • the Profile (or permission set) or profile permissions are showing up as New or Deleted despite you being certain that the Custom field permission or Apex class permission is in the org?

This article explains what is going on.

If you only use the Profile metadata type in the comparison filter, how the results are displayed differs depending on the environment type.

From an Salesforce org, this will retrieve nothing, as the org requires at least 2 metadata types to be able to retrieve any results. See this article for how you always need Profile plus another metadata type to show a result. (Make sure you select the correct Named items as well as the metadata type.)

From a git branch, Gearset pulls the Profile from the git branch as a whole Profile and that will include the various subcomponent types.

So despite the Admin profile being in my source org, if I only use the Profile metadata type in the comparison filter, the Admin Profile will show up as Deleted.

To change this I can run the comparison with the Profile and the Custom Object metadata type to surface the profile from the org.

Managed package setting

Additionally, if you have the Include managed packages set to None this will

  • retrieve no managed packages from an org

  • retrieve metadata regardless if they are from a managed package or not as the Git API does not have this concept of managed packages

This can results in permissions showing up as New or Deleted. The easiest way is to spot the namespace prefix in the item name. For example dsfs__ in the following screen shot.


Therefore, the comparison results may show something as New or Deleted, not because it doesn't exist in your org, but because the metadata filter that you are using does not retrieve that Profile junction item.

All you need to do to correct that is to add in the additional metadata type (for example Custom Object or Apex Class) to make the comparison result show what you are looking for.

Did this answer your question?