How to Share Tasks with Partner Users in Salesforce Communities: Configuration and Programmatic Solutions
Tenetizer Technologies
Tenet of Salesforce org must be preserved and intact in order to get maximum of it.
REQUIREMENT
To set up a Partner Community where multiple users from the same account can view each other’s Tasks, we need to ensure that if a partner user has access to a parent record (e.g., an Account or Opportunity), they also have access to related Tasks, regardless of Task ownership.
By default, in Salesforce, a user can only access Tasks they own, but the goal is to make Tasks accessible to all partner users within the same account.
The source of this article: https://tenetizer.com/task-visibility-for-partner-community-users-in-salesforce/
?REQUIRED CONFIGURATION
There are two primary ways to configure this:
#Both workaround assume that Partner User has?Edit Task?&?Activity?Object Access at profile level.
1. Global Configuration Using Sharing Settings
This method leverages Organization-Wide Defaults (OWD) for the Activity object to enable related records to be accessed based on the parent record's sharing settings.
2. Using the Standard "Public" Field on Task
Salesforce provides a standard field on the Task object called "IsVisibleInSelfService" or "Public". If the Public field is set to true, the Task becomes visible to external users, including partner community users.
领英推荐
?PROGRAMMATIC SOLUTIONS
In cases where business logic requires programmatic updates, you can automate setting the "Public" field using Flows or Apex.
1. Using Flow
You can create a Flow that updates the Public field automatically based on custom logic.
2. Using Apex Code
This example demonstrates how to programmatically update the Task's Public field:
Task t = [SELECT Id FROM Task LIMIT 1];
t.IsVisibleInSelfService = true;
update t;
Outcome:This Apex code snippet sets the IsVisibleInSelfService field to true, making the Task accessible to partner users.
NOTES:
This setup should allow partner users to view and access Tasks that are related to parent records they can access, even if they are not the owners of the Task.