Salesforce Certified Platform Developer II — Question 21

Universal Containers wants to use a Customer Community with Customer Community Plus licenses so their customers can track how many containers they are renting and when they are due back. Many of their customers are global companies with complex Account hierarchies, representing various departments within the same organization. One of the requirements is that certain community users within the same Account hierarchy be able to see several departments' containers, based on a junction object that relates the Contact to the various Account records that represent the departments.
Which solution solves these requirements?

Answer options

Correct answer: D

Explanation

The correct answer is D because an Apex Trigger can dynamically create Apex Managed Sharing records that allow community users to access the necessary containers across the Account hierarchy based on the junction object. Option A does not adhere to sharing rules, which may compromise security, while option B restricts visibility to owner-based filtering, and option C does not facilitate the required sharing capabilities for users across different departments.