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.
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.