Restoring Metadata Using Visual Studio Code

    To Restore the Metadata

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

    If any code has been added, deleted or changed, the rows with the changes are highlighted.

    1. Copy the code located in between the <field> </field> tags, and paste it under the folder you created in Visual Studio for the particular object.

    1. Save the XML file.
    2. 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 Visual Studio page:

     

    To Confirm the Restore of the Metadata

    1. Log in to Salesforce.
    2. Navigate to the Object Manager.

    1. Select the relevant object for the missing record.

    1. On the left-hand menu, click Fields & Relationships.

    1. Filter by typing the relevant record name in the Quick Find field.

    If the metadata record has been successfully restored, you see it displayed in this screen.

     

     

    « Previous ArticleNext Article »