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

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

AW Computing (AWC) handles orders in Salesforce and stores its product inventory in a field, Inventory__c, on a custom object, Product__c. When an order for a Product__c is placed, the Inventory__c field is reduced by the quantity of the order using an Apex trigger.



AWC wants the real-time inventory reduction for a product to be sent to many of its external systems, including some future systems the company is currently planning.

What should a developer add to the code at the placeholder to meet these requirements?

  • A.
  • B.
  • C.
  • D.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
4fc475e
7 months, 3 weeks ago
The answer is A. Also, you don't need Database.SaveResult to publish an event... it just contains information about whether the event was successful: https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_publish_apex.htm
upvoted 2 times
...
FriedConsole2000
8 months, 3 weeks ago
Selected Answer: A
Need to publish and event. Need "__e"
upvoted 1 times
...
Sapphire808
1 year, 1 month ago
A. But A is also missing "Database.SaveResult sr = EventBus.publish(ev);" to complete the answer. All events have "__e" appended to them since they are not standard objects or custom objects (__c) and require to be saved to the org using the Database.Saveresults object. https://trailhead.salesforce.com/content/learn/modules/platform_events_basics/platform_events_define_publish
upvoted 2 times
...
Ullr
1 year, 7 months ago
A Platform Events have suffix __e
upvoted 4 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 ...