Loading

Cannot update 'Closed Date' on Salesforce Cases

Udgivelsesdato: May 6, 2026
Beskrivelse

This article explains why the Closed Date field on Salesforce Cases cannot be manually edited and how to set it programmatically via the API during data migration.

The date of a closed Case cannot be manually edited. This field is considered to be an 'Audit Field' and is set when the case is moved to the Closed status. The Case can be opened then closed again, at which point the 'Closed Date' will reflect the new Closed Date, but it is not possible to edit the Closed Date to a specific value.

If you're migrating your cases from one system to another, it is possible to set the 'Closed Date' via the API when you perform an Insert to the object.

Løsning

To set the ClosedDate during a migration, you must use the Salesforce API with the 'Create Audit Fields' permission enabled on the org and the 'Edit Read Only Fields' permission on the user's profile.

Audit Fields

Audit Fields must be enabled in the organization and the User performing the insert must have the 'Edit Read Only Fields' Profile permission when using the API. To learn more, please review System Fields.

Note: When inserting the new record, the ClosedDate field can be set to any date. Please note the ClosedDate field can be inserted but cannot be updated. Additionally, the 'Status' field of the record must be set to Closed during the insert, otherwise the operation will fail.

Yderligere ressourcer

Enable 'Create Audit Fields': Step-by-step guide to enabling audit field creation in your Salesforce org

Enable the Salesforce Permission 'Create Audit Fields' for Standard Profiles

Salesforce Support Video: Learn How to Activate Create Audit Fields

Vidensartikelnummer

000386337

 
Indlæser
Salesforce Help | Article