Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
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 340 discussion

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

Instead of waiting to send emails to support personnel directly from the finish method of a batch Apex process, Universal Containers wants to notify an external system in the event that an unhandled exception occurs.

What is the appropriate publish/subscribe logic to meet this requirement?

  • A. Publish the error event using the addError() method and write a trigger to subscribe to the event and notify the external system.
  • B. Publish the error event using the addError() method and have the external system subscribe to the event using CometD.
  • C. Publish the error event using the Eventbus.publish() method and have the external system subscribe to the event using CometD.
  • D. No publishing is necessary. Have the external system subscribe to the BatchApexErrorEvent.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
BrucePark
Highly Voted 1 year, 3 months ago
Selected Answer: D
Isn't it D? https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/sforce_api_objects_batchapexerrorevent.htm
upvoted 6 times
...
FriedConsole2000
Most Recent 8 months, 4 weeks ago
Selected Answer: D
I believe "D" if you implement Database.RaisesPlatformEvents
upvoted 1 times
...
Sapphire808
1 year, 1 month ago
C I still believe C is correct. The keyword is that it notifies an external system. This can be associated with CometD, whereas BatchApexErrorEvents notifies subscribers and clients (people typically through email), not external systems. Comet D Documentation: https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_subscribe_cometd.htm BatchApexErrorEvent: https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/sforce_api_objects_batchapexerrorevent.htm
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 ...