Salesforce
PDII · Question #385
PDII Question #385: Real Exam Question with Answer & Explanation
The correct answer is C. Publish the error event using the Eventbus.publish() method and have the external system. See the full explanation below for the reasoning.
Question
Universal Containers wants to notify an external system, in the event that an unhandled exception occurs, by publishing a custom event using Apex. What is the appropriate publish/subscribe logic to meet this requirement?
Options
- APublish the error event using the addError() method and write a trigger to subscribe to the event
- BPublish the error event using the addError() method and have the external system subscribe to the
- CPublish the error event using the Eventbus.publish() method and have the external system
- DHave the external system subscribe to the event channel. No publishing is necessary.
Community Discussion
No community discussion yet for this question.