DocSF

DocSF

Did You Know?

We design Docy for the readers, optimizing not for page views or engagement

Massive upload record into custom metadata type

  • Open your VSCODE IDE and create a project (If you already have project created on your vscode skip this step)
  • Authorize your org
  • Now fetch the Custom Metadata Type definition from your Salesforce org to your local machine. Click on icon Retrieve Source From Org on ‘Custom Object’.
  • Prepare your .csv file and store in your project folder or any folder you want.
  • Put the column name same as fields API name.
  • Label (Name) API Name can only contain underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
  • If you have any space or any other special char in “Name” (Label) field replace with underscore(_)
  • Open the terminal in VS Code
  • Execute this cmdt command. Execute this cmdt command. sfdx force:cmdt:record:insert –filepath .file.csv –typename HDT_AfterthoughtDays__mdt -n Name

Now you will see the all custom metadata type records that have been created in your local machine in project folder.

Right click on Custom Metadata folder and click on “Deploy Source to Org”

DONE

Package xml

<types>
        <members>*</​members>
        <name>CustomMetadata</name>
    </types>
    <types>
        <members>*</​members>
        <name>CustomObject</name>
    </types>

Related Post

Web Designer Day

Web Designer Day on Friday 31st May 2019

Save 40% on 250 digital assets! Selected bestsellers an...

Forex 2.0

Chi opera stabilmente nel forex trading conosce le piat...

Telecom-Vivendi, Golden Power il 28/9

Slitta al 28 settembre, dunque il giorno dopo il bilate...

Leave a Comment