Certified Platform Developer II Exam QuestionsBrowse all questions from this exam

Certified Platform Developer II Exam - Question 2


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?

Show Answer
Correct Answer: CD

To satisfy the requirement that specific community users within the same Account hierarchy be able to see several departments' containers based on a junction object that relates the Contact to various Account records, an Apex Trigger is the most appropriate solution. This is because an Apex Trigger can create Apex Managed Sharing records, which allows for programmatic sharing of records based on complex relationships that can't be managed by standard sharing rules or configurations. This approach provides the flexibility needed to share records dynamically based on the junction object's relationships.

Discussion

8 comments
Sign in to comment
Soliton321Option: D
Jan 20, 2021

Anwser should be D

MMartin
May 16, 2022

Agree. https://developer.salesforce.com/docs/atlas.en-us.200.0.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm

SappaulOption: C
Jun 8, 2021

c is the right ans

levianOption: C
Sep 29, 2022

Its C, altough its possible making with Apex Trigger, Salesforce Alwats recommend to use the standard tools before use code.

Mak66Option: C
Jun 27, 2023

C and D can be the suitable answers but SF recommend to use more point & click than code so C should be the correct one.

moitamOption: D
Aug 22, 2023

I'm unsure here... but option C can provide reporting capabilities but would not handle the requirement of dynamically sharing records based on Account hierarchy and junction object relationships. So I would say option D is the correct one.

Sapphire808Option: D
Nov 2, 2023

C was not an option, therefore D.

Debugs_BunnyOption: D
Nov 10, 2023

C. A Custom Report Type and a report Lightning Component on the Community Home Page: This would provide a way for users to see data they have access to, but like Custom List Views, reporting respects the organization’s sharing model. Reports alone cannot grant additional access beyond what the user already has. D. An Apex Trigger that creates Apex Managed Sharing records based on the junction object's relationships: This approach uses Apex Managed Sharing to programmatically share records with users based on complex sharing requirements that cannot be met with standard sharing functionality. Apex Managed Sharing is specifically designed to handle scenarios where sharing needs to go beyond the typical role hierarchy or sharing rules.

ParuvOption: D
Jun 26, 2024

Ans: D