3

I was trying to understand how Access control mechanism works for Activity object.

I can understand following points:

  • In Sharing Setting OWD of Activity object can be defined as Private or Controlled by Parent.

  • Activity object cannot be shared by Sharing rule and this object doesn't have Sharing table at all.

  • Whether an object could have Activities or not, it can be defined during object creation upon selecting Allow Activities.

Allow activities

Can someone help me on how Access control mechanism works for Activity. Any documentation or link also appreciated.

1
  • I think [access-control] is just a synonym for [sharing] here so I removed that tag. Interesting Q&A here!
    – Adrian Larson
    Jul 10 '17 at 14:46
6

The OWD definition of Private for activities is little different than how it works for other objects .

When you put private as an organization wide default for activities the following is true:

Only the activity owner, and users above the activity owner in the role hierarchy, can edit and delete the activity, users with read access to the record to which the activity is associated can view and report on the activity.

This means that if you share for example an account all the activities on that account become visible.

So in true sense Setting Private still means its controlled by parent for read access while for edit access if the OWD is private you wont be able to edit even if the parent record provide access .

The answer takes some ideas from this Idea here in Success Community .

Behind the scenes I assume that salesforce looks at Parent Records Share Table with ParentId on the activity and also the looks into the owner field and the Group table for role hierarchy behavior .

Looks like activities are the biggest table in Salesforce and hence there are no plans of providing a separate sharing for this table .Take a look at this idea post .

0
3

To add to @mohithshrivastava's answer

Let's say you have OWD:

  • Account private
  • Case private
  • Activity private

Given ...

  • Activity T added to a Case C with parent Account A
  • Case C is owned by User U
  • Group G includes User V
  • All Accounts are shared to Group G
  • No cases are shared to Group G

Then ..

  • User V, although they can see Account A ...
  • Can not see the Case C or obviously, the related list of activities on Case C
  • And .... even though there is a related list of Activities on Accounts (because there is a field Task.AccountId), the activity T will not be shown on the Account's activity related list.

That is, the sentence in the Sharing Default Access Settings Help doc

users with read access to the record to which the activity is associated can view and report on the activity.

"associated" means via the WhatId

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.