exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 92 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 92
Topic #: 1
[All Certified Platform Developer II Questions]

Which statement is true about using ConnectApi namespace (also called Chatter in Apex)? (Choose two.)

  • 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
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
vancika
1 month ago
Selected Answer: CD
Why not A: The statement "Chatter in Apex methods honor the 'with sharing' and 'without sharing' keywords" is incorrect because: ConnectApi methods run in user context, and sharing is determined by the user's permissions and access levels. The with sharing or without sharing keywords have no direct impact on ConnectApi calls. These keywords control sharing rules for standard Apex operations, but ConnectApi methods inherently respect the user's context.
upvoted 1 times
...
BrainMelt12
1 month, 2 weeks ago
Selected Answer: AD
A: Chatter in Apex (ConnectApi) methods execute in the sharing context defined by the Apex class in which they are invoked. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm D: Testing Chatter in Apex methods often need access to actual organization data, as these methods may depend on existing records to function correctly. https://ktema.org/articles/testing-chatter-apex-without-seealldata-true/
upvoted 1 times
...
Anjindal
5 months, 1 week ago
correct ans is AC
upvoted 2 times
...
Dananth
2 years, 4 months ago
Also refer this https://developer.salesforce.com/docs/atlas.en-us.210.0.apexcode.meta/apexcode/connectAPI_TestingApex.htm
upvoted 3 times
...
Liquad
3 years, 2 months ago
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_differences.htm
upvoted 3 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago