Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

Reference -> https://developer.salesforce.com/trailhead/en/force_com_admin_beginner/data_modeling/object_relationships

enter image description here

share|improve this question
up vote 3 down vote accepted

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.

UPDATE:

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.

Scenario 2:

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.")

share|improve this answer
1  
I think your answer coincides more with the sharing rules bullet point "The detail record inherits sharing rules from the master record." – Jenny B Feb 11 at 17:51
    
When I create a new master object I do not set any permissions on profile level. I created a child object and a master-detail field on child object. I am unable to understand why I am not able to edit Custom Object Permissions for any profile – SfdcBat Feb 11 at 18:13
    
@JennyB you are correct. I probably misunderstood the question. I was thinking about permission granted by sharing rules and ownership. – Shailesh Deshpande Feb 11 at 18:17
    
@Rdvsm - are you working on standard profile?? – Shailesh Deshpande Feb 11 at 18:18
    
No , custom profile. It is called Marketing in free developer edition – SfdcBat Feb 11 at 18:19

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)

Enhanced Profile Editor Regular Profile Editor

share|improve this answer
    
isn't this true for any 'required' field in the database, not just the MD fields which too are required at the db level. Thanks – Prajith Feb 11 at 17:57
    
@Stygon yes but it mentions it specifically in the Trailhead Unit that it's required by default. So I'm just guessing at what they might have been referring to, could just be a mistake might be worth submitting it as feedback. – Jenny B Feb 11 at 18:00
1  
Yup second that. – Prajith Feb 11 at 18:02
    
Where do you get this screen? How do you navigate to this setting shown in the screen shot? – SfdcBat Feb 11 at 18:18
1  
I agree this could be a mistake. – Shailesh Deshpande Feb 11 at 18:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.