How should the architect fix this problem?

Universal Containers (UC) has a custom Apex class that enforces a business process and updates opportunity field-level security permissions of read only certain user’s profiles are being updated by their class.

How should the architect fix this problem?
A . Put the code in an class that uses the With Sharing keyword.
B. Use the IsUpdateable() Apex method to test each field prior to allowing updates.
C. Use the With SECURYT_ENFORCED keyword in the SOQL statement.
D. Add With Sharing keyword to the class.

Answer: C

Notify of
1 Comment
Inline Feedbacks
View all comments
1 month ago

Answer : C

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.