How to Retain Audit Fields (CreatedDate, LastModifiedDate, etc.) During Data Migration in Salesforce
- Enable the required user interface permission
- Validate system permission (Using Permission Set)
- Set audit fields during insert
- Populate audit fields (e.g., CreatedDate, CreatedById, LastModifiedDate, LastModifiedById) at the time of insert.
- Populate audit fields (e.g., CreatedDate, CreatedById, LastModifiedDate, LastModifiedById) at the time of insert.
Important Note
Standard audit fields cannot be updated
after record insertion.
They can only be populated
during the initial insert operation.
#Data Management #Org Migration
1 commento
Supported & Unsupported Objects
✅ Supported
Account, Contact, Lead, Opportunity, Case, Custom Objects
❌ Not Supported
Product2, Pricebook2, PricebookEntry, Campaign, Campaign Member, Solution
Reason:
Audit fields cannot be overwritten for product and price book objects
to ensure data integrity and consistent pricing across the organization.