Cannot delete record type

Salesforce does not allow record type deletions through the API

Support avatar
Written by Support
Updated over a week ago

Name of the deployment preview error

Cannot delete record type

Sample error message

You cannot delete RecordType instance. name: salesforce.RecordType.instance.Account_Customer

When will I see this deployment preview error?

This error occurs when you select a record type for deletion in a deployment.

For example, Account.RecordTypeA exists in sandbox but not in production. If you create a deployment from production to sandbox, selecting this record type would attempt to delete it in the sandbox.

Salesforce does not allow deleting record types through the API.

How does this affect my deployment?

The selected record type will be skipped and the deletion will not be attempted.

How can I fix this error?

Delete the record type manually in the target org.

You can learn more about deployment preview errors here.

Did this answer your question?