Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Certified Platform Developer II topic 1 question 229 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 229
Topic #: 1
[All Certified Platform Developer II Questions]

Universal Containers implements a private sharing model for the Convention_Attendee_ _c custom object. As part of a new quality assurance effort, the company created an Event_Reviewer_ _c user lookup field on the object. Management wants the event reviewer to automatically gain Read/Write access to every record they are assigned to.
What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?

  • A. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records to a group of Event Reviewers.
  • B. Create an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
  • C. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.
  • D. Create a Before Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
Reference:
https://help.salesforce.com/articleView?id=security_apex_sharing_reasons.htm&type=5

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Soliton321
Highly Voted 3 years, 3 months ago
B is correct. You need Id of record you want to share. That wont be available in before trigger
upvoted 13 times
...
stan_malta
Most Recent 5 months, 1 week ago
Selected Answer: B
As Soliton321 said
upvoted 1 times
...
Dev_Bond_ZA
10 months, 2 weeks ago
Why not A?
upvoted 1 times
Dev_Bond_ZA
10 months, 2 weeks ago
Oh wait, ignore that - Sharing rules is not possible because you cannot share to a field on the record, only groups of users, roles etc.
upvoted 2 times
...
...
Shirrin
1 year, 7 months ago
We are insering share object of custom object and this should be in after trigger
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...