Monday, April 3, 2017

Retrieve Salesforce Profile XML using Workbench

For retrieving salesforce profile, you need to fetch all metadata components which consists of custom objects, applications, VF pages, Apex classes etc. So in profile retrieve request you not only get profile, but all other metadata components.

In Article Retrieve Metadata Using Workbench, I explained process to use workbench for retrieving a particular metadata type. Profile is also one of the metadata type, but it requires other components with it for it to work.

Here is the sample XML that you can use to retrieve profiles -

https://github.com/sushilgit/ProfileComparison/blob/master/Tool/package.xml

In above xml, if you want to retrieve some specific profiles instead of all, you may update the xml as follows -

 <types>
<members>Custom: Marketing Profile</members>
        <name>Profile</name>
 </types>

What are the type of profile permissions retrieved by above process -

Apex Class
Apex Page
Custom application
Custom Object
Custom Tab
HomePageLayout
Layout
Connected App
External Data Source
Custom Permission

No comments:

Post a Comment