exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 179 discussion

Actual exam question from Salesforce's CRT-450
Question #: 179
Topic #: 1
[All CRT-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?

  • A. Use the schema describe calls to determine if the logged-in user has access to the Account object.
  • B. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
  • C. Use the with sharing keyword on the class declaration.
  • D. Use the without sharing keyword on the class declaration.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Brauliongon
Highly Voted 2 years, 5 months ago
Is using the with sharing keyword
upvoted 13 times
...
tMana
Most Recent 11 months, 1 week ago
C is the correct answer
upvoted 2 times
...
Alf8
1 year, 1 month ago
Selected Answer: C
See with sharing definition https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm
upvoted 3 times
...
ApexMike
1 year, 4 months ago
Selected Answer: C
C is the way to go
upvoted 2 times
...
tapasroy
1 year, 9 months ago
It seems the correct answer is C.
upvoted 4 times
...
golhgh
2 years, 2 months ago
yes, correct answer is C. Use the with sharing keyword on the class declaration.
upvoted 3 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 ...