0

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

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">
  <types>
    <members>Account</members>
    <name>CustomObject</name>
  </types>
  <types>
    <members>Admin</members>
    <name>Profile</name>
  </types>
  <version>60.0</version>
</Package>

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.

2

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.