Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Sharing and Visibility Architect All Questions

View all questions & answers for the Certified Sharing and Visibility Architect exam

Exam Certified Sharing and Visibility Architect topic 1 question 20 discussion

Actual exam question from Salesforce's Certified Sharing and Visibility Architect
Question #: 20
Topic #: 1
[All Certified Sharing and Visibility Architect Questions]

Universal Containers (UC) has a custom Apex class that enforces a business process and updates opportunities. UC has noticed that fields with field-level security permission of read only on certain users’ profiles are being updates by this class.
How should the architect fix this problem?

  • A. Use the WITH SECURITY_ENFORCED keyword in the SOQL statement.
  • B. Put the code in an inner class that uses the With Sharing keyword.
  • C. Use the ISUpdatetable() Apex method to test each field prior to allowing update.
  • D. Add With Sharing keyword to the class.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
NoelSF
Highly Voted 1 year, 4 months ago
the answer should be C, as a SOQL with WITH SECURITY_ENFORCED will still execute correctly and verifies Read access for Field and Object, not Edit access.
upvoted 9 times
...
btiba2223
Highly Voted 1 year, 2 months ago
answer should be C https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_with_security_enforced.htm
upvoted 6 times
...
BlackFox91
Most Recent 4 months, 1 week ago
Selected Answer: C
Should be C. The isUpdatetable allow to control access in edition of a field, while the A will trigger an error only if the field is not visible to the user
upvoted 2 times
...
Rangya
8 months, 2 weeks ago
A and C both are the ways to achieve this. With C, we can have graceful handling of access error while with A, it throws an exception causing any further transaction termination.
upvoted 1 times
...
Nilesh_Nanda
10 months ago
The answer should be C
upvoted 1 times
...
nerdycute
1 year ago
Answer should be C.
upvoted 3 times
...
amanad13
1 year, 5 months ago
isUpdateable can be used on fields to check if a user has edit/update access to that field. WITH SECURITY_ENFORCED is just for soql retrieving records & with sharing keywords have to do with record level access and not field or object level access.
upvoted 5 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 ...