When a Salesforce org has the "Create Audit Fields" permission enabled, administrators can preserve historical record metadata — such as the original CreatedDate and CreatedById values — when importing records using Salesforce Data Loader. This is particularly useful when migrating data from a legacy system where maintaining an accurate audit trail is required.
To set audit field values during a Data Loader import, you must use an External ID field as the matching key during an Upsert operation. The External ID field (a custom Text field marked as unique and external) serves as the identifier that allows Data Loader to recognize a record as new rather than an update to an existing record. This approach lets you create new records while populating CreatedDate, CreatedById, LastModifiedDate, and LastModifiedById from your source data.
Requirements:
Step 1 — Create an External ID Field on the Target Object
An External ID field is a custom Text field that is designated as unique and marked as the identifier from an external system. Follow these steps to create one:
Step 2 — Prepare Your CSV File
Your CSV file must include:
Step 3 — Upsert Records Using Data Loader to Set Audit Fields
Important Notes:
See also:
000383278

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.