We have a custom object in our development sandbox that we've removed Delete permissions on for a custom security profile.

In our package.xml, I've included the custom object and the custom security profile but when I deploy, the target org still has the delete permission set for the object and profile.

I verified that the <allowDelete> is set to false in the profile xml:

enter image description here

Modify All Data is not checked in the source profile and there were no errors during deployment.

How does one deploy Custom Object Permissions (object-level Read, Create, Edit, Delete, etc.) using the ANT-based Salesforce Migration Tool?

  • 1
    This only works on custom profiles. Are you sure you're using a custom profile?
    – sfdcfox
    Commented Apr 18, 2017 at 20:15
  • Yes, it's a custom security profile. Commented Apr 18, 2017 at 20:19
  • 1
    Some permissions require other permissions. Did you get an error, like maybe you've got Modify All Data specified on the profile?
    – sfdcfox
    Commented Apr 18, 2017 at 20:21

1 Answer 1


As it turns out, the profile in the target org was in an invalid state. While I did not receive any errors during the deployment of that profile, I did receive an error if I tried to manually edit that profile:

Error: Invalid Data.
Review all error messages below to correct your data.
Permission Import Solutions depends on permission(s): Delete Solutions, Edit Solutions

Once I unchecked Import Solutions in the source profile, I was able to deploy the profile change to remove Delete permissions from my custom object.

On a side note, but still relevant to this problem, a second profile I'm trying to deploy would not remove the Delete permissions on my custom object, but it does have Modify All Data permission enabled, preventing the update.

You must log in to answer this question.

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