Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - 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
1 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
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
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
...
Rolande
13 days ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Freeman
21 days ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Jina
2 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
16 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
25 days ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
In
1 months ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
...
Markus
2 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
12 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
16 days ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Xuan
20 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
Cyndy
10 hours 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
3 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
...
Alyce
4 days ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Estrella
9 days ago
A) Use the with sharing keyword on the class declaration.
upvoted 0 times
...
Bulah
11 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
17 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
19 days ago
B) Use the without sharing keyword on the class declaration.
upvoted 0 times
...
Maira
25 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
3 months ago
I think the developer should use the with sharing keyword on the class declaration.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77