Pages

Tuesday, January 6, 2015

Salesforce: Activity Controlled by Parent

In Salesforce.com, for Activity objects (Task & Event), there are only 2 option in the Organization-Wide Defaults sharing setting:
- Controlled by Parent
- Private

Private
Only activity owner (label as Assigned To), 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 (Name and Related To) can view and report on the activity.

Controlled by Parent
A user can perform an action (such as view, edit, transfer, and delete) on an activity based on whether he or she can perform that same action on the records associated with the activity.

Example, if a task is associated with the Acme account and John Smith contact, then a user can only edit that task if he or she can also edit the Acme account and the John Smith record.

Parent of the activity record is:
- Who Id (Name) : Contact and Lead
- What Id (Related to) : Account, Opportunity, Asset, Campaign, Case, including custom object with Allow Activities enabled.

To edit task, user need to have Edit Tasks permission defined in the Profile or Permission Sets, and to edit event, user need to have Edit Events permission defined in the Profile or Permission Sets. Both permission located under General User Permissions in the profile, or this permission also can be assign to specific users.

When user create a task/event, regardless the parent of task/event owner, the default task/event will be assigned to the current user, not based on parent record owner.

When user assigned to a task/event, user able to access and edit the task/event (again users need to have Edit Tasks/Edit Events permission to edit task/event), regardless the OWD sharing setting for Activity, even user do not have access to the parent record of that Activity record. This include users in the higher role-hierarchy of the assigned user.

Permissions related to View an activity:
  • Be assigned to the activity, or
  • Be above the user assigned to the activity in the role hierarchy, or
  • Have at least read access to the record to which the activity is associated, or
  • Have the “View All” object-level permission in the related record, where the sharing model for that record is “Controlled By Parent,” or
  • Have the “View All Data” permission

Create an activity:
  • Have the “Edit Tasks” and “Edit Events” permissions; AND
  • Have at least read access to a record, if associating the activity with another record

Edit or Delete an activity:
  • Have the “Edit Tasks” and “Edit Events” permissions AND
  • Be assigned to the activity, or
  • Be above the user assigned to the activity in the role hierarchy, or
  • Have the “Modify All” object-level permission in the related record, where the sharing model for that record is “Controlled By Parent,” or
  • Have the “Modify All Data” permission

View, add, and edit events on other users’ calendars
  • Have the “Edit Tasks” and “Edit Events” permissions to create and edit activities AND
  • Have access to the user’s calendar, which depends on your organization-wide calendar sharing defaults and how the user has set up individual calendar sharing.

Note:
Events marked as private via the Private checkbox are accessible only by the user assigned to the event. Other users cannot see the event details when viewing that user’s calendar.
However, users with the “View All Data” or “Modify All Data” permission can see private event details in reports and searches, or when viewing other users’ calendars.

Tip:
The user who is assigned to an activity in the Assigned To field is often referred to as the “activity owner”.


Reference: