Salesforce allows system fields to be set through the API during data migration. When migrating data from an external system, the API lets you set a number of fields on objects that were previously read-only. By setting these fields, records appear to have been created at the time they were originally created on your old system.
Since these fields are intended to be Audit Fields, they can only be set on create (INSERT) and not on update. If the records already exist in Salesforce, they must be exported to a CSV file, deleted in Salesforce, and then imported with the updated information as new records.
Salesforce recommends enabling this feature only during data migration. In certain cases, such as routinely copying new data from an external system to Salesforce, this can be enabled permanently. This feature must be enabled by a System Administrator.
LastModifiedDate and LastModifiedBy fields will not reflect the inserted value if a Task is associated with a Contact or Lead (WhoID) or other records such as Account, Opportunity, or Campaign (WhatID) during Task Insert.The Create Audit Fields feature enables administrators and developers to set system-level audit fields via the API during data insertion. These fields can only be set on INSERT — not on UPDATE or UPSERT. The permission Modify All Data is required.
The following fields are granted additional access through this feature:
The following conversion-related Lead object fields can also be set on INSERT:
Create Audit Fields can be used on the following objects: Account, CampaignMember, CareService, Case, CaseComment, CodeSet, Contact, ContentNote, ContentVersion, Contracts, EmailMessage, FeedComment, FeedItem, FinancialGoal, FinancialPlan, HealthCondition, Idea, IdeaComment, Lead, Opportunity, Quote, Vote, Work Order, Task, Event, Attachment, and all custom objects.
Note: Set Audit Fields are also supported for Health Cloud and Financial Cloud Managed Package Objects, including Health Cloud objects such as CodeSet, HealthCondition, and CareService, and Financial Cloud objects such as FinancialPlan and FinancialGoal.
Cannot update 'Closed Date' on closed Case
Set audit field values for imported records
Enable the permission 'Create Audit Fields' for standard profiles
Inserted values not populated in 'Last Modified Date' and 'Last Modified By' fields
Update the 'Last Modified By' field on a Lead record
000386065

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.