New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Certified Platform Developer II (Plat-Dev-301) Exam - Topic 9 Question 7 Discussion

Actual exam question for Salesforce's Salesforce Certified Platform Developer II (Plat-Dev-301) exam
Question #: 7
Topic #: 9
[All Salesforce Certified Platform Developer II (Plat-Dev-301) Questions]

Universal Containers allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers' sales representatives can edit the orders on the same Visualforce page.

What should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Winfred
4 months ago
Seems like a solid choice, but I'm not 100% sure.
upvoted 0 times
...
Sheldon
4 months ago
I thought using profiles would be enough.
upvoted 0 times
...
Avery
4 months ago
Wait, can you really test sharing with runAs?
upvoted 0 times
...
Lashandra
4 months ago
Definitely agree with that!
upvoted 0 times
...
Ilene
4 months ago
I think option C is the way to go!
upvoted 0 times
...
Shonda
5 months ago
I thought we should test as both a sales rep and a community user to see how sharing works, so maybe C is the answer?
upvoted 0 times
...
Marylin
5 months ago
I remember practicing a similar question where we had to test permissions, and I think using System.runAs() was the right approach.
upvoted 0 times
...
Nakita
5 months ago
I think we need to use System.runAs() to simulate different user profiles, but I'm not entirely sure if it should be sales reps or community users.
upvoted 0 times
...
Krystal
5 months ago
I feel like using System.profilels() might not enforce sharing rules correctly, but I can't recall the exact details.
upvoted 0 times
...
Cassie
5 months ago
I'm a little confused. Aren't all of these considered sentinel events? I'll have to review the material again to be sure.
upvoted 0 times
...
Emeline
5 months ago
Hmm, I'm a bit unsure about this one. The options seem to cover different aspects of the investigator's responsibilities, but I'll need to think it through carefully.
upvoted 0 times
...
Heike
5 months ago
Okay, let me think this through. We have three variables that need to be summed up to equal 60. I'm leaning towards option D, since it seems the most direct way to add the variables together.
upvoted 0 times
...

Save Cancel