Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam DEX-450 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:

Lashon
30 days 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
1 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
4 days 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
8 days ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Freeman
15 days ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Jina
1 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
10 days 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
19 days ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
In
25 days ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Markus
1 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
6 days 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
10 days ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Xuan
14 days ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Geraldine
2 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
Estrella
4 days ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
Bulah
5 days 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
11 days 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
14 days ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Maira
19 days ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Yvonne
2 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
2 months ago
I agree with Chandra. Using with sharing will enforce sharing permissions for the currently logged in user.
upvoted 0 times
...
Chandra
2 months ago
I think the developer should use the with sharing keyword on the class declaration.
upvoted 0 times
...

Save Cancel