function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hm_inviHm_invi 

change default record type for profiles using changeSets or xml files?

Hello devs, 

I have to delete many Account record types . i have been deactivating and deleting them in the sandbox by manually removing them from mainly sharing settings and then from each profile. 

The profile part is where i'm facing the issue. There are almost 40 profiles for which the record types are default. 

I have manually changed the default record type in the sandbox. then in the changeset i have included these profiles and some unreleated apex classes for deployment. 

Deployment was successfull in the production but the profile default record types for the  account are not changed. 

Is there anything else i need to include in the changeSet?

is there any other approach for this? Like deploying using xml in workBench?

We are not authorized to use ANT in production. Thats why workbench. 

In the sandbox i can use ANT but i couldn't retrieve the profiles. 
    <types>
      <members>Account</members>
      <name>CustomObject</name>
    </types>
    <types>
       <members>*</members>
       <name>Profile</name>
    </types>
I was able to retrieve Account object but not the profiles.

It says **BUILD FAILED with java IOException: syntax incorrect.**
this is the short version of it. 

Is there any easy approach for this?

Thanks for your help!!!
 
VinayVinay (Salesforce Developers) 
I don't think you can do this with changeset,  however you can try using ant tool or workbench by changing metadata file manually and deploy.

Check below reference.
https://salesforce.stackexchange.com/questions/2202/changing-default-record-type-for-all-profiles

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,