I found this post (especially Adam Torman's comment) really helpful in getting to the most elusive element of a profile--which record types are assigned to it for creation: Available Record Type by Profiles

However, when I did a "Retrieve" in Workbench with a package.xml with * on CustomObject and * on Profile, I only got the permissions for recordtypes on Custom Objects, not standard objects like Account and Case (where I really need it). I know this sounds obvious because the metadata element literally says "CustomObject", but when I look at my package.xml I pull down in MavensMate, Account and Case ARE listed in there. And there certainly doesn't seem to be a metadata type for StandardObject.

Does anybody know how to pull this down in a similar way? We have thousands of record types and hundreds of profiles (bad I know--this is part of an effort to clean them up). We've written a python script that reads through the XML and compiles it into a nice excel file, but the missing link is all of the record type profile permissions on standard objects, which are of course the most important.

  • Here's the package.xml I have been using: <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="soap.sforce.com/2006/04/metadata"> <types> <members>*</members> <name>CustomObject</name> </types> <types> <members>*</members> <name>Profile</name> </types> <version>26.0</version> </Package> – Patrick Watkins Jun 5 '16 at 22:29

Standard objects aren't retrieved using the CustomObject wild card syntax. You must specifically reference each standard object you want to retrieve.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  • Thanks! Apparently you can also mix and match as well. So this gives me account PLUS all the custom objects: <members>Account</members> <members>*</members> – Patrick Watkins Jun 6 '16 at 16:44
  • @PatrickWatkins You're exactly right. You can also list custom objects by name instead of grabbing all of them. – sfdcfox Jun 6 '16 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.