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.xmlfile from the converted SFDX source - Compare the
Amount__c.field-meta.xmlandTravel_Expense__c.objectfiles 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…
- Open the
force-app/main/default/directory in the VS Code Explorer. - Click on the
Amount__c.field-meta.xmlfile. - Examine the focused nature of the metadata in the
.field-meta.xmlfile. 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.
- Open the
Amount__c.field-meta.xmlfile. - Open the
Travel_Expense__c.objectfile. - Move the editor tab for the
Travel_Expense__c.objectover to the right of the VS Code window until it wants to “snap” into the two-column display - Observe how the limited set of metadata in the
Amount__c.field-meta.xmlfile is just a small part of the much largerTravel_Expense__c.objectfile.