Are you comparing
- between a git branch to a Salesforce org, and
- the Profile (or permission set) or profile permissions are showing up as
Deleteddespite you being certain that the
Custom field permissionor
Apex class permissionis 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.
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
To change this I can run the comparison with the
Profile and the
Custom Object metadata type to surface the profile from the org.
Therefore, the comparison results may show something as
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.