3

I am using force.com migration tool to retrieve newly added fields and field permission for one of the profile from one sandbox and deploy it into another sandbox. I am able to do this successfully. but I have question on the .profile file that is created after retrieve command from the Source org.

Here is Package.xml used during retrieve and deploy,

enter image description here

Here is how .profile file looks after retrieved on the local disk,

enter image description here

Can somone help me understand why the UserPermission are retrieved in the .profile file ? Is this causing to overwrite userpermissions for this profile in the destination org. If I don't want to change anything on the userpermission, is there any way to ignore userpermission ?

Please note - my retrieve and deploy is working without any issue and I can see the correct field permission for the profile in the destination org. I created Package.xml using Force.com IDE

I am curious to know why userpermissions are being added to .profile file.

1 Answer 1

1

Retrieving profiles always retrieves all user permissions. The solution is to filter out those permissions after retrieving the files.

There's a library we use called xmltask that is used in ant scripts to build XML files based on patterns. I rightfully haven't looked into it much personally, but the point is there are tasks built that you could use, or even write your own (it's simple Java code).

You could even use Rhino and script the editing/filtering in JavaScript.

1
  • thanks! I tried manually removing userpermissions from the .profile file and then running the deploy. Worked fine.
    – apn
    Aug 14, 2014 at 14:55

You must log in to answer this question.

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