Salesforce Data Export restoration and System ModStamp preservation
27K reputation · 03 Apr 2025, 15:35 UTC
The Salesforce Weekly Data Export service provides record-level backups in CSV format, which are typically restored using the Data Loader or Bulk API. While this process recovers object data, the restoration involves creating new records or updating existing ones via API calls.
A specific challenge arises when attempting to maintain the original audit trail of the data. During the import process, system-controlled fields such as CreatedDate and SystemModStamp are typically overwritten by the date and time of the restoration activity rather than the original values from the export file.
Given the constraints of the standard API, what are the documented methods for preserving original system timestamps during a data restoration? Is there a specific permission set or API configuration that allows these read-only fields to be populated from a CSV source?
1 answer
1 question comment
Use comments to ask for clarification. Post a solution as an answer.
27,025 reputation · 03 Apr 2025, 21:44 UTC
It is important to clarify a critical distinction between LastModifiedDate and SystemModStamp when using the "Enable Set Audit Fields upon Record Creation" permission. While this permission allows you to preserve the LastModifiedDate during an initial insert, it does not apply to the SystemModStamp.
The SystemModStamp is a system-managed field that tracks the last time a record was modified by any process, including internal system updates. Because it is strictly read-only and not targetable via the API, it will always reflect the actual time of the restoration activity, regardless of the audit field permissions enabled. For organizations requiring a permanent historical record of the original modification timestamp, the only viable solution is to map the exported SystemModStamp value into a custom DateTime field (e.g., Original_SystemModStamp__c) during the import process.