I would like to retrieve the recordTypeVisibilities for all the record types for a particular profile. Is there a way to achieve this using the readMetadata() API call instead of doing a file based retrieve with * in the package.xml?

I am talking about this API - https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_readMetadata.htm

Is there a way to specify recordtype visibilities for a particular profile in this api call?

1 Answer 1


The Metadata API only retrieves permissions for related metadata in the API call. For example, to get the various object, field, and record type permissions, you would include CustomObject:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04">

Returns the admin profile with all of the account permissions (object accessibility, field accessibility, record type accessibility, etc).

Since you're not allowed to mix types, this means that readMetadata won't work for your use case.


You must log in to answer this question.

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