I'm deploying a destructiveChanges.xml file via Force.com Migration Tool to delete some listViews, Custom Fields, and Groups.

I determined we also can remove some record types from Cases. I received the error when I tried to deploy:

Error: Cannot delete record type through API

I'm not seeing that documented any where, and this is my first type attempting to use Force.com Migration Tool. Before adding record types to the destructiveChanges.xml file I had successful deployments, so I'm fairly certain I'm using it properly.

<types> <members>case.Associate_Services</members> <members>case.InformationTechnology</members> <members>case.Operational</members> <members>case.Website</members> <name>RecordType</name> </types>

1 Answer 1


I did further research on the SFDC developer forums to see if anyone was able to get it actually delete a record type. The only response I received was:

I checked the access level for the RecordType object through the schema explorer. The following access levels were mentioned - createable, queryable, replicatable, retrieveable, updateable. It does not say that it is deletable through the api. Thus I think if you try to delete record type records from the record type pbject you will be receiving that error.

Based on that and the error I receive, I would assume the documentation is incorrect.

  • How curious. Have you reported this error in the documentation for revision?
    – sfdcfox
    Aug 11, 2014 at 16:25
  • @zainogj Out of interest, were there any existing records using that record type. I know when removing a managed package you can't do it if there are any record using record types that are part of the package. It may be that the same restriction applies for the Metadata API. Mar 24, 2015 at 1:49
  • 1
    @Daniel Ballinger : I wasn't having any records using the recordtype but i still got the error Aug 30, 2018 at 5:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .