When readng through trailhead salesforce I came across a line which I am unable to digest. The line says - "You can’t set profile object permissions for a detail record". What does this mean? In my free developer org, I went to setup->profile->any one profile->Custom object permission, Is that where I should be looking to understand this?
This refers to objects which are related by the master detail relationship. In case of such relationships we have two objects - parent ( usually referred as Master) and child(referred as detail). When a master detail relationship is created, all the security features that are applied on the parent(Master) object are inherited by the child(Detail) object. For eg: if a user has certain set of permissions on parent object then he will have same set of permissions on child object. You cannot specify the permissions for child object.
I hope I am able to clarify your question.
I think I figured out what this statement meant. I think it meant - The permissions for being able to create, edit or delete a child record depends on permissions set on master object.
If you have "read" permissions on Master object, you can go ahead and set read, create, edit and delete permissions on Child object.
If you dont give "read" permissions on Master object, then you wont be able to give any permissions on child object.
I tried below in my dev org.
Scenario 1: I had read permissions on Master object and read, create, edit and delete on child object.
- When i removed read permissions on master object, all permissions on child object were automatically removed.
Now i tried giving read and create permissions on child object, with no permissions on master object.
- I was expecting SFDC to throw an error, but surprisingly it allowed me to do that. But what it also did was, it automatically enabled read permissions on Master object.
Thus, from the above, i can say, what salesforce states is correct. You need to provide atleast read permission on master object for being able to set permission on child object.(Which indirectly means- "You can’t set profile object permissions for a detail record.")
I'm wondering if they mean that you can't set the profile object permission for the master field on the detail record. I am looking at a Profile at a Custom Object that is the detail (Line Items) to the Master record Invoice. I cannot modify the access to the field that relates to the Master Invoice as seen in this image, the field is grayed out and checked since it is required by default as noted in the Trailhead unit.
This creates a special type of relationship between two objects (the child, or detail) and another object (the parent, or master). This type of relationship closely links objects together such that the master record controls certain behaviors of the detail and subdetail record. In a master-detail relationship, the ownership and sharing of detail records are determined by the master record, and when you delete the master record, all of its detail records are automatically deleted along with it. Master-detail relationship fields are always required on detail records.
It might also be an error, you should submit your question as feedback on Trailhead.
Added 2 screenshots -> one with and one without the enhanced profile editor. (Click on Setup -> Profiles -> One of your Custom Profiles -> Object Settings or Scroll Down to Custom Object Permissions... Also note that I have Enabled Enhanced Profile User Interface under Setup -> User Interface)