Loading
Prepare for Email to Become the Default Login ExperienceRead More
Own from Salesforce
Restore and Confirm Metadata for Salesforce Using Visual Studio Code

Restore and Confirm Metadata for Salesforce Using Visual Studio Code

Use Visual Studio (VS) Code to restore metadata and recover changes in your Salesforce environment. Efficiently run a metadata compare job to identify added, changed, or removed metadata records. View and select changes, copy code, and deploy it back to your Salesforce org.

Restore Metadata using VS Code

  1. Run a Metadata Compare job in the Own application.
    You are transferred to the Jobs tab.
  2. Once the Smart Metadata Compare Report has been generated, you can view which metadata records have been added, changed, or removed, and select the appropriate column to view the change.

    The rows of code that have changed are highlighted.

  3. Copy the code located in between the <field> </field>tags, and paste it under the folder you created in VS for the particular object.
  4. Save the XML file.
  5. Right click on your mouse, and from the drop-down list select SFDX: Deploy Source to Org.
    The job begins and the status is displayed at the bottom of the VS page.

Confirm Metadata is Restored

  1. Log in to Salesforce.
  2. Navigate to the Object Manager.
  3. Select the relevant object for the missing record.
  4. On the left-hand menu, click Fields & Relationships.
  5. Filter by entering the relevant record name in the Quick Find.

    If the metadata record has successfully been restored, you will see it here.

 
Loading
Salesforce Help | Article