Create Projects
Retrieve Source
Deploy Source
Quick Start with Deploy and Retrieve
Source Format
Source Diff
Use a Manifest File
Detect Conflicts on Deploy
Deploy On Save
Delete Source
Rename Components
In this quick start, we add a custom field to an object in our org and then retrieve its metadata into our Salesforce project. Then, we make a simple edit to the field and deploy the changes back to our org.
First, let’s add a custom field in an org that you are connected to:
Now, let’s retrieve the metadata for this new custom field into our Salesforce project.
force-app/main/default/object/Account.In the fields folder, a file named Created_On__c.field-meta.xml contains metadata for your new custom field.
The metadata is:
1<?xml version="1.0" encoding="UTF-8"?>
2<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
3 <fullName>Created_On__c</fullName>
4 <description>Date of Account Creation</description>
5 <externalId>false</externalId>
6 <label>Created On</label>
7 <required>false</required>
8 <trackFeedHistory>false</trackFeedHistory>
9 <type>Date</type>
10</CustomField>Let’s now make a simple edit to this field and deploy our changes back to our org with a single click.
Created_On__c.field-meta.xml and change the <required> tag value to true to indicate that this custom field is required.objects/Account folder and click SFDX: Deploy Source to Org.