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 259 discussion

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

In the following example, which sharing context myMethod execute when it is invoked?

public Class myClass {
public void myMethod() { /* implementation */ }
}

  • A. Sharing rules will not be enforced for the running user.
  • B. Sharing rules will be inherited from the calling context.
  • C. Sharing rules will be enforced for the running user.
  • D. Sharing rules will be enforced by the instantiating 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
SS1121
4 months, 3 weeks ago
Selected Answer: A
Apex without an explicit sharing declaration is insecure by default. We strongly recommend that you always specify a sharing declaration for a class.
upvoted 2 times
...
irina_735
1 year, 1 month ago
Selected Answer: B
If a class isn’t explicitly declared as either with sharing or without sharing, the current sharing rules remain in effect. Therefore, the class doesn’t enforce sharing rules except when it acquires sharing rules from another class. For example, if the class is called by another class that has sharing enforced, then sharing is enforced for the called class. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm
upvoted 1 times
...
irina_735
1 year, 1 month ago
Selected Answer: A
Without Sharing is the default for an Apex class. It means you are disabling or ignoring sharing rules.
upvoted 4 times
...
esabbatini
1 year, 5 months ago
Selected Answer: B
It is the default, a is wrong
upvoted 1 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 ...