2

I have a user who is trying to view a "Contact A" related to "Account A" and here are the settings.

  1. User has read access for the "Account A" and all the contacts related to "Account A" as per the record in AccountShare object for this user:
+--------------------+--------------------+----------+
| AccountAccessLevel | ContactAccessLevel | RowCause |
+--------------------+--------------------+----------+
| Read               | Read               | Manual   |
+--------------------+--------------------+----------+
  1. OWD setting for Contact object is "Controlled by Parent"
  2. There is no record in ContactShare object for the user but I think it does not matter because user already has read access as per ContactAccessLevel field value from the AccountShare object.
  3. I have checked this salesforce article and I am not sure it matters because user already has read access for all the contacts related to "Account A" as per the record in AccountShare object.

EDIT:

  1. I checked the UserRecordAccess and it shows MaxAccessLevel = None for the contact.
  2. Yes, user profile has Read and Edit access to Contact object.

Anything I am missing here?

  • Aren't 3 and 4 the same questeion? – Adrian Larson Dec 25 '16 at 19:33
  • Yes, I am repeating the same thing in #3 and #4 but in different context so that others know why I think user should still have access to view the contact. – javanoob Dec 25 '16 at 19:36
  • What happens if you (as admin) do this in Developer Console Query: SELECT MaxAccessLevel, RecordId FROM UserRecordAccess WHERE UserId = '005...' AND RecordId = '003...'? – sfdcfox Dec 25 '16 at 19:41
  • Do the user has read access on Contact in profile? – Santanu Boral Dec 25 '16 at 19:45
  • @sfdcfox, I updated question but ContactAccessLevel shows "Read" for the user for the Account. What does this field exactly mean? – javanoob Dec 25 '16 at 19:49
1

According to the Object Reference Guide of Salesforce and Force.com the definition of the field "ContactAccessLevel" as follows:-

Level of access that the User or Group has to contacts associated with the account. The possible values are:

• None • Read • Edit

This field must be set to an access level that is at least equal to the organization’s default ContactAccessLevel. This field can't be updated via the API if the ContactAccessLevel field is set to “Controlled by Parent.” You can't update this field for the associated account owner using the API. You must update the account owner’s ContactAccessLevel via the Salesforce user interface

So the field is very much related to the sharing object model. I would like to interpret the technical specification as the Contact can be associated with the single user or we can create the group of users and associate this contact with the newly created group.

The Link - https://resources.docs.salesforce.com/204/latest/en-us/sfdc/pdf/object_reference.pdf

  • I read the documentation on this field but it is still not clear. What do you think is the problem in my case? – javanoob Dec 25 '16 at 20:48
  • Can you run the query specified by the @SfdcFox and get the result? The query result(s) is going to clarify the issue I believe. – Prolay Chaudhury Dec 25 '16 at 21:04
  • I ran that query and updated the question with the result. – javanoob Dec 25 '16 at 21:05
  • I would like to suggest you to check the profile and the object permission of the user. There is something missing in sharing settings. – Prolay Chaudhury Dec 25 '16 at 21:07
  • :) I checked the profile of the user and that profile has read and edit access to contact object. This also I updated in the question. – javanoob Dec 25 '16 at 21:08
0

My bad. I forgot to mention that it was for Community user.

As per salesforce documentation for contact object:

Special Access Rules Customer Portal users can access only portal-enabled contacts.

I had to enable the contact as portal user and that solved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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