Newer Version Available
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.
Arguments
| Name | Type | Description |
|---|---|---|
| argumentObj | Object | An object containing all the arguments to be passed into this method. |
argumentObj
| 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. |
Sample Code
This example publishes a custom event and logs the result.
Component Code:
Controller Code:
Response
Returns a Promise. Success is indicated if the promise is fulfilled. Failure is indicated if the catch clause is invoked.