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:
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?
Best Answer
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:
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.