-
Notifications
You must be signed in to change notification settings - Fork 519
PlatformEventRecipes
pozil edited this page Nov 20, 2023
·
16 revisions
Demonstrates how to publish events on the event bus
Group Platform Event Recipes
See TriggerHandler
publishes a platform event
| Param | Description |
|---|---|
event |
an Event_Recipes_Demo__e object |
| Type | Description |
|---|---|
Database |
Database.SaveResult |
Account acct = new Account(name = 'Awesome Events Ltd.');
insert acct;
Event_Recipes_Demo__e evt = new Event_Recipes_Demo__e(accountId__c = acct.id, title__c='Updated website', url__c = 'https://developer.salesforce.com');
Database.saveResults result = PlatformEventsRecipes.publishEvent(evt);
System.debug(result);Internal custom exception class
Inheritance
PlatformEventRecipesException