Salesforce Certified Platform Developer II — Question 51
Which statement is true about using ConnectApi namespace (also called Chatter in Apex)? (Choose two.)
Answer options
- A. Chatter in Apex methods honor the 'with sharing' and 'without sharing' keywords
- B. Chatter in Apex operations are synchronous, and they occur immediately
- C. Chatter in Apex methods do not run in system mode; they run in the context of the current user
- D. Many test methods related to Chatter in Apex require the IsTest (SeeAllData=true) annotation
Correct answer: C, D
Explanation
The correct answers are C and D. Chatter in Apex methods execute in the context of the current user, meaning they do not run in system mode. Additionally, many test methods involving Chatter require the IsTest (SeeAllData=true) annotation to access the data. Options A and B are incorrect because Chatter in Apex methods do not honor the sharing rules and can have asynchronous operations depending on the context.