Newer Version Available

This content describes an older version of this product. View Latest

Create an Event with an EventUuid Field

The EventUuid field uniquely identifies an event message and is used to match the events returned in the callback result with the events in the publish call. To have the system generate an EventUuid field value in each event object, use the SObjectType.newSObject(recordTypeId, loadDefaults) Apex method to create the event object.

If you aren’t interested in correlating the events in the publish call with the publish results, you don’t need the EventUuid value in the created event. In this case, you can create the event by using the event API name directly, which doesn’t include the EventUuid value in the event object. For example: Order_Event__e event = new Order_Event__e();.

Note