Salesforce has the ability to set system fields through the API. When you are 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 will appear to have been created at their original created time from your old system.
These fields are permitted additional access through the activation of this feature across the below noted objects:
Additionally, fields from the Lead object related to conversion can also be defined on insert:
The objects that you can set these fields on are:
Contracts - as of Spring '15
Task and Events
All Custom Objects
Note: This does not permit the values to be updated, only inserted.
Permissions Required to set Audit Fields: "Modify All Data"
Once enabled, you will be able to set these fields when creating new records. Since these fields are intended to be audit fields, you will only be able to set them on create, not update. If the records already exist in Salesforce, they will need to be exported to a .csv file, deleted in Salesforce, and then imported with the updated information as new records.
In general, Salesforce recommends that this feature only be enabled while you are doing 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 an system administrator in the organization.
Enabling Create Audit Fields
Closed Date field on Case object
How to specify the values in Created By, Created Date, Last Modified By ID, Last Modified Date
Organizations with the "Create Audit Fields" permission enabled may fail to update the Last Modified Date and Last Modified By fields
What causes the 'Last Modified By' field to update on Leads?