I am trying to give permission(Same what Account object has) on my custom object which is master detail with Account object. But getting Field integrity exception.

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Permission Create CustomeObj__c depends on permission(s): Read Account: [] current user has Read Write permission on Account object.

Previously i was assuming that if a object has Master Detail relation then automatically master object permission will assign to new object but it is not happening.

Any idea how to overcome this error.


1 Answer 1


When you create a Master Detail Field on a Custom Object, you are working on the Detail side. http://www.salesforce.com/developer/docs/api/Content/relationships_among_objects.htm

You will need to update the Sharing Setting attribute of the Master-Detail relationship field to make sure you want to allow them to create details if they have read or read/write access to the master object.

You will also need to make sure that the profile that the user is assigned to has the correct object permissions on your Custom Object. Setup->Manage Users -> Profiles or a permission set is created that provides access to the custom object. Whichever your organization prefers.

  • Profile which i am using is System Administrator and and has access to Account object with Read/Write permission.Sharing setting attribute of Master detail relationship field also has Read/Write permission. postimg.org/image/pm7zs0om3
    – San
    Jan 15, 2015 at 9:06

You must log in to answer this question.

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