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 DEX-450 Exam - Topic 7 Question 66 Discussion

Actual exam question for Salesforce's DEX-450 exam
Question #: 66
Topic #: 7
[All DEX-450 Questions]

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with

Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see

Accounts they do not own.

What should the developer use to enforce sharing permissions for the currently logged in user while using the custom search tool?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Lasandra
4 months ago
Isn't there a risk with B? That seems risky for data access.
upvoted 0 times
...
Teddy
4 months ago
A is correct, it enforces the sharing rules properly.
upvoted 0 times
...
Shenika
4 months ago
Surprised they can see accounts they don't own at all!
upvoted 0 times
...
Dorothy
4 months ago
I disagree, I think C makes more sense for filtering.
upvoted 0 times
...
Mignon
4 months ago
Definitely A, using with sharing is the way to go!
upvoted 0 times
...
Raylene
5 months ago
I vaguely recall something about schema describe calls, but I don't think they actually enforce sharing. I feel like the answer has to be related to the sharing keyword.
upvoted 0 times
...
Brock
5 months ago
I think we had a practice question about filtering records based on user permissions. Using userInfo to filter SOQL queries sounds familiar, but I'm not confident it's the best approach here.
upvoted 0 times
...
Ronnie
5 months ago
I'm not entirely sure, but I feel like "without sharing" would allow users to see more records than they should. That doesn't seem right for this scenario.
upvoted 0 times
...
Ardella
5 months ago
I remember we discussed the importance of using the "with sharing" keyword to enforce sharing rules. I think that might be the right choice here.
upvoted 0 times
...
Daisy
5 months ago
Based on my understanding, the Customer Success Manager is the one who works closely with the customer executives to align the purchased solutions with their business goals.
upvoted 0 times
...
Georgene
5 months ago
Definitely A. You can't just start shopping around without knowing your specific needs first. Classic project management approach.
upvoted 0 times
...
Sage
5 months ago
The way I see it, the main purpose is to obtain agreement on the requirements, so I'm going to go with option A. Feels like the most straightforward answer.
upvoted 0 times
...
Lashon
9 months ago
Using without sharing? Bold strategy, Cotton. Let's see if it pays off. Just kidding, that's a hard pass from me. C is the way to go, keep that data safe and sound.
upvoted 0 times
...
Cyril
10 months ago
Option A with sharing? More like 'with no access' amirite? Gotta go with C on this one, my dudes. Keeping that data locked down is the way to go.
upvoted 0 times
Alline
9 months ago
C) Use the userInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
upvoted 0 times
...
Rolande
9 months ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Freeman
9 months ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Jina
10 months ago
Hmm, schema describe calls? That seems a bit overkill for this use case. Why complicate things when you can just use the userInfo class like in Option C? It's a no-brainer.
upvoted 0 times
Micah
9 months ago
C) Use the userInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
upvoted 0 times
...
Alline
9 months ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
In
9 months ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Markus
10 months ago
Whoa, without sharing? That's a bold move, but I wouldn't recommend it. Sounds like a security nightmare waiting to happen. Option C is the clear winner here.
upvoted 0 times
Leota
9 months ago
C) Use the userInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
upvoted 0 times
...
Stephaine
9 months ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Xuan
9 months ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Geraldine
10 months ago
Option C sounds like the way to go. Using the userInfo class to filter the SOQL queries ensures that only the records the user has access to are returned. Keeps things simple and secure.
upvoted 0 times
Cyndy
8 months ago
Option C sounds like the way to go. Using the userInfo class to filter the SOQL queries ensures that only the records the user has access to are returned. Keeps things simple and secure.
upvoted 0 times
...
Han
8 months ago
C) Use the userInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
upvoted 0 times
...
Alyce
8 months ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Estrella
9 months ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
Bulah
9 months ago
Option C sounds like the way to go. Using the userInfo class to filter the SOQL queries ensures that only the records the user has access to are returned. Keeps things simple and secure.
upvoted 0 times
...
Rhea
9 months ago
C) Use the userInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
upvoted 0 times
...
Dallas
9 months ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Maira
9 months ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Yvonne
11 months ago
I'm not sure, but I think using the userInfo Apex class to filter SOQL queries could also work to ensure the user only sees their own accounts.
upvoted 0 times
...
Cordelia
11 months ago
I agree with Chandra. Using with sharing will enforce sharing permissions for the currently logged in user.
upvoted 0 times
...
Chandra
11 months ago
I think the developer should use the with sharing keyword on the class declaration.
upvoted 0 times
...

Save Cancel