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

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 244 discussion

Actual exam question from Salesforce's CRT-450
Question #: 244
Topic #: 1
[All CRT-450 Questions]

Given the following code snippet, that is part of a custom controller for a Visualforce page:

In which two ways can the try/catch be enclosed to enforce object-level permissions and prevent the DML statement from being executed if the current logged- in user does not have the appropriate level of access to the object? (Choose two.)

  • A. Use if(thisContact.OwnerId == User.Info.getUserId())
  • B. Use if(Schema.sObjectType.Contact.isAccessible())
  • C. Use if(Schema.sObjectType.Contact.fields.Is_Active__c.isUpdateable())
  • D. Use if(Schema.sObjectType.Contact.isUpdateable())
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
irina_735
1 year, 1 month ago
Selected Answer: CD
We use isAccessible() – before querying
upvoted 1 times
...
DonAldos
1 year, 7 months ago
Selected Answer: BC
B) Schema.sObjectType.<objectApiName>.isAccessible(): This method checks if the current user has read access to the specified object. C) Schema.sObjectType.<objectApiName>.fields.<fieldApiName>.isUpdateable(): This method checks if the specified field on the object is updateable by the current user.
upvoted 1 times
...
moorer
1 year, 10 months ago
Selected Answer: BD
those are the correct answers
upvoted 4 times
21012023
1 year, 9 months ago
And the question asks for the object access, not field level access.
upvoted 2 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 ...