<< Prev Question Next Question >>

Question 33/35

Customer complaints for bad interactions with a customer support agent are logged as Cases and assigned to a human resources representative. The agent of the complaint should not see the case, but their manager should.
How is this accomplished?

Recent Comments (The most recent comments are at the top.)

test - Dec 02, 2025

**Correct Answer: B. Trigger on Case to lookup and share to the manager of an Assigned Agent custom field (the subject of the complaint) using Apex Managed Sharing.**

---

### **Explanation**

The requirement is:

* The **agent who is the subject of the complaint** must **not see the case**.
* The **agent’s manager** should **see the case**.
* Cases are assigned to **HR**, not the agent.

Given this:

1. **Role Hierarchy or Criteria-Based Sharing Rules won’t help**:

* **A. Criteria-based sharing rule** ❌

* Criteria-based sharing rules can only share to **users, roles, or public groups**, but you **cannot dynamically share with the manager of a user referenced in a custom field**.
* The "Assigned Agent" is not the owner; the manager of that user cannot automatically get access via standard sharing rules.

* **C. Case owned by the subject** ❌

* You **cannot make the agent the owner** (they must not see it).
* Even if you remove their CRUD permissions, this is **not a standard, safe way** to manage this scenario.

2. **Apex Managed Sharing works**:

* With **Apex Managed Sharing**, you can programmatically grant access to a **specific user** (the manager of the Assigned Agent) while ensuring the agent does not get access.
* Trigger logic: On Case creation → look up the manager of the Assigned Agent → create a **CaseShare** record granting access to the manager.

This approach ensures **fine-grained, dynamic access control** that standard sharing cannot accomplish.

---

### ✔️ Key Takeaway

**Dynamic record sharing based on a related user field often requires Apex Managed Sharing, especially when the subject should not see the record but their manager should.**...

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (35q)
2 commentQuestion 1: Universal Containers (UC) delivers training in 500 different...
1 commentQuestion 2: Universal Containers (UC) has affiliates who sell containers...
1 commentQuestion 3: Universal Containers uses Person Accounts to represent retai...
1 commentQuestion 4: Universal Containers requested to leverage Lightning Web Com...
1 commentQuestion 5: A custom Invoice object has been created with a master-detai...
1 commentQuestion 6: Universal Containers has expanded to sell virtual containers...
1 commentQuestion 7: Users at Universal Containers are complaining that a field h...
3 commentQuestion 8: An architect has a requirement to create a criteria-based sh...
2 commentQuestion 9: A consulting company uses the Salesforce mobile app for its ...
1 commentQuestion 10: Which option can be selected to share data when creating a s...
1 commentQuestion 11: Universal1 Containers (UC) is a non-profit organization with...
1 commentQuestion 12: A sales rep at Universal Containers was added to an opportun...
1 commentQuestion 13: Universal Containers has implemented Customer Community with...
1 commentQuestion 14: A sales rep (John) at Universal Containers requested to upda...
5 commentQuestion 15: Sales operations at Universal Containers (UC) has created Pu...
1 commentQuestion 16: Sales reps at Universal Containers (UC) complain about the m...
2 commentQuestion 17: Universal Containers uses 75,000 distributors that have clos...
Question 18: Besides their own team accounts, sales managers at Universal...
Question 19: An architect from a previous project implemented Platform Sh...
1 commentQuestion 20: Which method should be used to grant an unrelated group of u...
Question 21: Universal Containers (UC) delivers training and courses to s...
Question 22: Universal Containers (UC) would like to store an encryption ...
Question 23: Universal Containers is implementing Sales Cloud. During the...
1 commentQuestion 24: Which advanced tool should Salesforce enable for large-scale...
1 commentQuestion 25: Sales operations at Universal Containers (UC) wants to creat...
2 commentQuestion 26: To grant Universal Containers sales managers access to shipm...
1 commentQuestion 27: Universal Containers (UC) has a partner community for its 20...
Question 28: Universal Containers (UC) has created a custom Invoice objec...
Question 29: Universal Containers has selected a small and diverse group ...
1 commentQuestion 30: A user posts a file to the Chatter feed for a record of an o...
1 commentQuestion 31: Which community function is impacted by having the Site User...
1 commentQuestion 32: The sales managers at Universal Containers requested their t...
1 commentQuestion 33: Customer complaints for bad interactions with a customer sup...
1 commentQuestion 34: Dreamforce presenters need to be able to edit their presenti...
Question 35: The finance team at Universal Containers usually does not ha...