Welcome to my blog

I have been working with Salesforce for quite a while, so don’t hesitate to contact me if you have any questions or want some advice.

s f

Subscribe
Follow Us
h

Retrive Profile/PermissionSet with object and field permission?

 . Deployment  . Retrive Profile/PermissionSet with object and field permission?

Retrive Profile/PermissionSet with object and field permission?

Retrive Profile / PermissionSet With Object And Field Permission?

Profile Deployment – Right now small organization using ANT or Force.IDE tool for deployment. Many of them having issue to Objects and Fields level profile/PermissionSet permissions.

Current Problem: When you pull profile alone using ANT or Force.com IDE tool – you will be getting only User Level permissions not Object and Field level permission. Many have wrong understanding that below package.xml will give entire profile permission

<types>
    <members>Admin</members>
    <name>Profile</name>
</types>

Actually understanding is wrong. This will return only User level permissions.

Solution for All Object Permission: If you want to pull all objects and fields permission – you have to add CustomObject with your package.xml.

<types>
    <members>Admin</members>
    <name>Profile</name>
</types>
<types>
    <members>*</members>
    <name>CustomObject</name>
</types>

Note : Profile will have All User Level Permission and Account Object, Field, Tab and RecordType Level Permissions for that Profile.

screen-shot-2016-10-12-at-4-57-31-pm

Solution for Specific Object Field Permission: Need to add CustomField with your package.xml.

<types>
    <members>Admin</members>
    <name>Profile</name>
</types>
<types>
    <members>Account.AccountSource</members>
    <name>CustomField</name>
</types>

Note : Profile will have All User Level Permission and AccountSource Field Level Permission for that Profile.

Post a Comment