sendCustomEvent() for Lightning Experience
Sends a custom event to the client-side chat window for a chat with a specific chat key. This method works only in Lightning console apps.
| Name | Type | Description |
|---|---|---|
argumentObj | Object | An object containing all the arguments to be passed into this method. |
| Name | Type | Description |
|---|---|---|
recordId | String | The ID of the event that you want to customize. |
type | String | The name of the custom event type. |
data | String | The data attached to the custom event. |
This example publishes a custom event and logs the result.
Component Code:
Controller Code:
The custom event type must match the name of your custom event. Replace myCustomEventType with your own custom event name.
Returns a Promise. Success is indicated if the promise is fulfilled. Failure is indicated if the catch clause is invoked.