Skip to main content
All CollectionsTroubleshootingSalesforce validation errors
Resolving validation errors - "Custom metadata type "XXX_mdt" is not available in this organization"
Resolving validation errors - "Custom metadata type "XXX_mdt" is not available in this organization"

Validation error "Custom metadata type "XXX_mdt" is not available in this organization" was surfaced during a deployment

Valerio Chang avatar
Written by Valerio Chang
Updated over a month ago

Explanation of the error:

This Salesforce error that Gearset is surfacing is usually encountered when deploying a new custom metadata type.

This error is returned by Salesforce because deploying new custom metadata depends on two metadata types: custom metadata and custom object. Deploying just the custom metadata without the custom object will cause the deployment to fail.

Resolution:

To resolve this issue, you'll need to include both the new custom metadata you are trying to deploy, and the corresponding custom object that it references in your deployment.  

Doing this will resolve the validation error

How to find the custom object: If you already have custom object included in your metadata filter, you can simply select the appropriate custom object from the comparison table. 

If you can't find your specific custom object, you will need to refresh your filter. Click Manage custom filters on the comparison screen:

Then either:

  • Switch the toggle for custom object to All items, or

  • Switch the toggle for custom object to Named items and include just the custom object your custom metadata depends on

Disclaimer: This error is returned by Salesforce directly, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.

Did this answer your question?