I just spent 20 minutes changing a custom object's default record type for every profile that we have. For future reference, is there a way to change this across all profiles?
Attribution to: dannymorty
Possible Suggestion/Solution #1
Not in one shot. The best I think you can do this via the Force.com Migration Tool and the metadata API. You would need to perform the following steps:
- Download all of the profiles. This is easy since the wildcard operator works with Profiles.
Open each file (they're XML), find the entry, and update it. It will look like this:
<recordTypeVisibilities>
<default>true</default>
<recordTypes>MyObject.NewDefaultType</recordTypes>
<visible>true</visibles>
</recordTypeVisibilitiess>
- Upload the new metadata
Assuming you can do a global find and replace I think this would be easier than clicking through the web UI.
Caveat: This may only work on custom objects; the Metadata API does not work completely with standard fields on standard objects. Since you mentioned custom object it would probably work fine.
Attribution to: Mike Chale
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/2202