When loading data from external systems into Salesforce, there might be a legitimate business requirement to update the System Audit fields in Salesforce, but in general Salesforce doesn’t support modifying the System fields because they are read only fields. Nevertheless, in Winter ’16 release, Salesforce introduced a new feature to allow setting the value for the system fields on record creation.
The system audit fields are as follows:
We can set value to the above read only fields while importing records using the tool like Data Loader. This is used when there is a need to update (or retain) the original created or updated date of the record from the external system.
In order to implement this feature, the user must have the Enable Set Audit Felds upon record Creation and Update records with Inactive owners User permissions , and it must be enabled under Setup -> Customize -> User Interface as shown below,
Also the user must have the Modify all Data permission in order to update the values of the audit fields. The audit field can be set only for record creation not for record update. Salesforce has provided this feature only for 180 days. The user must raise a case to enable this feature to have this permanently enable for their organizations.
In addition to the system audit fields, the following fields can also be set for the Lead conversion:
Once Salesforce has enabled the feature ‘Create Audit Fields’, the users can find those audit fields while mapping the fields in data loader for record insertion.
This feature is available in Enterprise, Performance, Unlimited and Developer Editions.
The API Enabled permission is also needed for data migration through API.
Set Audit Fields upon Record Creation
The “Set Audit Fields upon Record Creation” permission is supported for the following objects:
- All custom objects
Update Records with Inactive Owners
This feature is available to update the owner of the records by active users, if the original records are owned by inactive users. Those records can be updated with the active users and the fields can also be updated to initiate the sharing. So, such records can be shared with other users based on the fields used in the criteria.
The same can be accomplished, when the records are updated from the API or external system through the import tools like Data Loader.
The “Update Records with Inactive Owners” permission is supported for the following objects:
- All custom objects