Using Ant Deployment. As the title says, when I deploy I get errors on my custom profiles:

profiles/Some.profile -- Error Permission Manage All Custom_Object__c depends on permission(s): Read All Contact.

If I look at the permissions for this profile through the browser I can see that, under Standard Object Permissions, that Contact has all rows selected.

Where is this "Read All" parameter?

Under "Contact Field-Level Security for profile" there are some fields that aren't enabled. So do I need to enable them all?!


The user license associated with this profile is "Force.com App Subscription"

In the sandbox org, Here's what I see from the Profile page:enter image description here

In the developer org, If I create a profile based on "Force.com App Subscription" I see this: enter image description here

So in the sandbox View All is enabled, in the developer View All is disabled.

  • Did you get any solution for it. I am also facing the same issue?
    – user18031
    Mar 18, 2015 at 15:45
  • @chandan remove all object level permissions (modify all, read all, read, write etc.... ) from the link object.
    – powlo
    Mar 19, 2015 at 10:29
  • Any insight into this error? I'm getting the same thing. Is it related to master-detail relationships?
    – tggagne
    Sep 4, 2015 at 20:58
  • 1
    @tggagne yes it's related to master detail. Basically, if you don't deploy permissions for the master object then you shouldn't deploy "view all" or "modify all" on the detail object, because that's not something you have control over.
    – powlo
    Sep 14, 2015 at 11:32
  • @powlo - can you pls add as a answer. so that it'll be immediately visible
    – Ysr Shk
    Jul 29, 2020 at 12:46

1 Answer 1


I just ran into a very similar issue with Opportunity and a custom object that had a Master-Detail relationship back to Opportunity.

I was attempting to insert an ObjectPermissions record against Opportunity for a particular ParentId PermissionSet and got the following error:

Id permissionSetId = //... Some existing Permission Set gets looked up. 

// Note the omission of PermissionsViewAllRecords = true
ObjectPermissions opportunityObjectReadPermission = new ObjectPermissions(SobjectType = 'Opportunity',
                                                        PermissionsCreate = false,
                                                        PermissionsDelete = false,
                                                        PermissionsEdit = false,
                                                        PermissionsRead = true
opportunityObjectReadPermission.ParentId = permissionSetId;
insert opportunityObjectReadPermission;

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Permission Read All ChildCustomObject__c depends on permission(s): Read All Opportunity: []

It turned out there was already an ObjectPermissions record for ChildCustomObject__c that had PermissionsViewAllRecords = true. For that to exist there was already a corresponding ObjectPermissions for Opportunity with the same view all records setting. That makes sense:

If you are going to allow the view all records permission on the detail object in a master-detail relationship you also need to grant it on the master object.

This is applicable to your deployment issue as well. You can't deploy permissions for the child/detail sObject without also deploying the required permissions to the master sObject.

You must log in to answer this question.

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