Clone-Aware Default Logic: Protecting Carried-Forward Values
How trigger-based default field logic can interfere with record cloning, and patterns to detect and handle clone operations safely.
How trigger-based default field logic can interfere with record cloning, and patterns to detect and handle clone operations safely.
When cloning SObjects in Apex, partially clearing system audit fields (CreatedDate, LastModifiedDate) causes FIELD_INTEGRITY_EXCEPTION errors. All four audit fields must be cleared together.