Salesforce Fact #857 | BatchApexErrorEvent subscribe using LWC
BatchApexErrorEvent can be subscribed in LWC as well. For this, we have to import the required functions from lightning/empApi module and the channel name is '/event/BatchApexErrorEvent'.
In this example, we have subscribed to the BatchApexErrorEvent using LWC and showing a toast error message on receiving the error.
References: https://developer.salesforce.com/docs/component-library/bundle/lightning-emp-api/documentation
Attached are the screenshots.
Comments
Post a Comment