Examine the Converted SFDX Source Files

Now that you’ve converted your Metadata API source to SFDX Source, let’s take a look at some of the differences between the two formats.

In this exercise, you will…

  • Examine the Amount__c.field-meta.xml file from the converted SFDX source
  • Compare the Amount__c.field-meta.xml and Travel_Expense__c.object files to observe how “source decomposition” makes SFDX and MDAPI source different

Examine the Amount__c.field-meta.xml file from the converted SFDX source

One of the most striking differences between MDAPI and SFDX formats is the use of source decomposition. For example, custom fields on objects are broken out into their own files, rather than being part of a monolithic .object file.

You can see this in action by…

  1. Open the force-app/main/default/ directory in the VS Code Explorer.
  2. Click on the Amount__c.field-meta.xml file.
  3. Examine the focused nature of the metadata in the .field-meta.xml file. It only has settings that are relevant to that field, making it easy to separate changes to this field from changes to the entire Travel Expense object.

Compare the Amount__c.field-meta.xml and Travel_Expense__c.object files to observe how “source decomposition” makes SFDX and MDAPI source different

Use VS Code’s two column editor layout to look at these files side-by-side.

  1. Open the Amount__c.field-meta.xml file.
  2. Open the Travel_Expense__c.object file.
  3. Move the editor tab for the Travel_Expense__c.object over to the right of the VS Code window until it wants to “snap” into the two-column display
  4. Observe how the limited set of metadata in the Amount__c.field-meta.xml file is just a small part of the much larger Travel_Expense__c.object file.

Updated: