DataSourceField

Represents the details of a data source field.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

DataSourceField components have the suffix .dataSourceField and are stored in the dataSourceFields folder.

Version 

Introduced in API version 52.0.

Special Access Rules 

You need the Salesforce Customize Application permission to access this metadata type.

Fields 

datatype 

  • Type: string
  • Required: Yes
  • Description: Required. Indicates the data type of the field: text, number, or date.

dateFormat 

  • Type: string
  • Required: No
  • Description: The date format of date, time, date/time fields.

definitionCreationType 

  • Type: DefinitionCreationType (enumeration of type string)
  • Required: No

externalDataType 

  • Type: string
  • Required: No
  • Introduced: API version 63.0
  • Description: The type of data in the external system.

externalName 

  • Type: string
  • Required: Yes
  • Description: Required. Name of the object in the external system. This is different from the developer name.

fieldFormula 

  • Type: string
  • Required: No
  • Description: Used for formulas.

isDataRequired 

  • Type: boolean
  • Required: No
  • Description: If true, data is required. Default value is false.

isEventDate 

  • Type: boolean
  • Required: No
  • Introduced: API version 63.0
  • Description: If true, an event date is required. Default value is false.

isFormula 

  • Type: boolean
  • Required: No
  • Description: If true, a formula is required. Default value is false.

isKeyQualifierFromSource 

  • Type: boolean
  • Required: No

isRecordModified 

  • Type: boolean
  • Required: No
  • Introduced: API version 63.0
  • Description: If true, the system tracks the modification date of the record. Default value is false.

keyQualifierName 

  • Type: string
  • Required: No
  • Introduced: API version 62.0
  • Description: Contains the developer name of the keyQualifier field.

length 

  • Type: int
  • Required: No
  • Description: Length of a string column.

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Required. Field label.

precision 

  • Type: int
  • Required: No
  • Description: The total number of digits in a number including decimal points. Used for currency and for numeric accuracy.

primaryIndexOrder 

  • Type: int
  • Required: No
  • Description: If supplied, indicates that this field is part of the primary key. The number value indicates the order of attributes if it’s a compound primary key. A missing value means that this field isn’t part of the primary key.

scale 

  • Type: int
  • Required: No
  • Description: The number of digits to the right of the decimal point. Used for currency and for numeric accuracy.

sequence 

  • Type: int
  • Required: Yes
  • Description: Required. The sequence of this source schema.

srcKeyQualifier 

  • Type: string
  • Required: No
  • Introduced: API version 55.0
  • Description: Contains a reference to the source key qualifier record. The source key is the MktDataLakeSrcKeyQualifer metadata type.

usageTag 

  • Type: UsageTag (enumeration of type string)
  • Required: No
  • Introduced: API version 55.0
  • Description: Indicates if the field is a key qualifier field. Values are:
  • Possible values:
    • KEY_QUALIFIER — The field is used as a key qualifier field.
    • NONE — The field isn’t used as a key qualifier field.

versionNumber 

  • Type: double
  • Required: Yes
  • Description: Required. The version of the data source object.

Declarative Metadata Sample Definition 

This is an example of a DataSourceObject component and its fields. You can retrieve the DataSourceField component only through its parent object, DataSourceObject.

1<DataSourceObject xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2    <dataSource>test1108</dataSource>
3    <dataSourceFields>
4        <fullName>DOB</fullName>
5        <datatype>D</datatype>
6        <externalName>DOB</externalName>
7        <isDataRequired>false</isDataRequired>
8        <masterLabel>DOB</masterLabel>
9        <sequence xsi:nil="true"/>
10        <versionNumber xsi:nil="true"/>
11    </dataSourceFields>
12    <externalRecordIdentifier>individuals_20200125_000000_csv</externalRecordIdentifier>
13    <masterLabel>test1108</masterLabel>
14    <objectType>Object</objectType>
15</DataSourceObject>

The following is an example package.xml that references the previous definition.

1<types>
2        <members>test1108</members>
3        <name>DataSource</name>
4    </types>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.