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?

  • This is worth to suggest on ideas site
    – Saariko
    Oct 11, 2012 at 15:19

1 Answer 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:

  1. Download all of the profiles. This is easy since the wildcard operator works with Profiles.
  2. Open each file (they're XML), find the entry, and update it. It will look like this:


  3. 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.

  • This is great information. I haven't explored the migration tool yet but this gives me a great project to begin with. Thanks.
    – dannymorty
    Oct 11, 2012 at 15:19
  • Way to go mike!!!impressed Oct 11, 2012 at 15:28
  • 3
    Since I'm here, I may as well add that you can create a new record type (setting it as default), then deleting the old record type (and replacing with the new type). This has the same effect and only needs the UI, no code required.
    – sfdcfox
    Sep 26, 2013 at 15:52
  • 2
    @MikeChale I missed this comment. When you delete an RT, you can replace it with another; so just replace the old with the new, and you're done.
    – sfdcfox
    Jan 31, 2014 at 14:40
  • 3
    I found this DOES work for standard objects too. The trick is that you also need to include the standard object as part of your package.xml that you use when retrieving the profiles. For example, if you want to modify Campaign record type visibility, you muse also retrieve the Campaign object metadata along with the profiles that you want to change. This will cause the Campaign recordTypeVisibilities for the Campaign record types to be include in the Profile meta xml files.
    – tlfu
    Nov 18, 2016 at 13:43

You must log in to answer this question.

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