Could not infer a metadata type salesforce

image

What metadata components are supported by Salesforce DX?

Salesforce DX supports dashboards and folders, as outlined in the supported metadata components documentation. The entire list included below. In order to make sure that the components are retrieved, make sure you add them to the package.

How do I edit the metadata of my Salesforce Org?

Now you need to download text files called “metadata” that represent the current state of your Salesforce org onto your computer so that it’s easy to edit their contents. Salesforce only lets you edit a tiny bit of the “metadata” in your org directly through the web site’s Developer Console (e.g. Apex triggers & classes).

How to deploy custom metadata records in sfdx?

Run ‘sfdx force:source:push’ will deploy the records. Thus ‘sfdx force:source:pull’ will no longer attempt to extract the custom metadata record since it is no longer “newer” in the scratch org.

Why aren’t custom metadata records created in scratch Orgs detected?

Custom Metadata Records created in scratch orgs don’t get detected by source:pull if these records are created against a Custom Metadata Type associated with a managed package. ERROR: Custom metadata type …__mdt is not available in this organization.

image


Painless and simple

The process of trying to edit my org’s “metadata” with VSCode instead of Eclipse was not nearly as bad as I thought it’d be.


Computer admin rights

Note that if you don’t have “administrator” rights on your computer, you may need them – or need someone from your IT department to help you install this software whenever the installers prompt for an “admin password.”


Software to install

There are 4 pieces of software you’ll need to have installed properly on your computer, per Salesforce documentation:


Connect VSCode to a Salesforce org

This official documentation has screenshots of most of the steps below.


Download metadata files

Now you need to download text files called “metadata” that represent the current state of your Salesforce org onto your computer so that it’s easy to edit their contents.


Edit and re-upload a configuration file

Open one up in the VSCode file editor by double-clicking it. Make it one that’s still inactive and a first draft, and that you don’t care much about if you break it.

image

Leave a Comment