Questions tagged [empapi]
The empapi tag has no summary.
24 questions
1 vote
0 answers
367 views
LWC Platform Event Listener Inconsistently Receives Events - What Could Be the Issue?
I'm building a Lightning Web Component that subscribes to a platform event using the lightning/empApi module. The platform event is published successfully (I’ve verified this with Mavens Chrome Plugin ...
0 votes
1 answer
478 views
Issue with Platform Event Subscription in LWC - Not Receiving Events
I am encountering an issue with a Lightning Web Component (LWC) that is intended to subscribe to a platform event and handle notifications when a new event is published. Despite the Apex class ...
0 votes
0 answers
60 views
EventUuid is missing in platform event data received in LWC using emp-api
I am working on a platform event that is subscribed in LWC using lightning/empApi. I am getting all the data as expected but the EventUuid field is constantly missing. I have tried with multiple ...
1 vote
1 answer
190 views
Subscribing to custom event channel with enriched fields
Using LWC I'm trying to subscribe to a custom event channel. Unfortunately, I'm getting the "The channel specified is not valid" error. I created a custom event channel and event channel ...
0 votes
1 answer
96 views
Async implementation of EmpApi's Subscribe method
Need to wait the Subscribe operation to be done to get the message from Platform Event to use that message in the Apex call in LWC. You can check the code below. // Apex method call to insert metadata ...
2 votes
1 answer
1k views
empAPI unsubscribe not working LWC
I am using the empAPI module in LWC and 99% of the code is working. The subscription, receiving of events, etc. all work -- except the unsubscribe method. It is very important for me to unsubscribe ...
2 votes
1 answer
567 views
Does a Managed Package LWC that subscribes to platform event need the namespace?
I have a platform event in my managed package. My_Platform_Event__e I have a LWC that subscribes to it. For this LWC to work in subscriber org, does my LWC need to include the namespace? i.e. In my ...
4 votes
0 answers
1k views
My LWC (with Emp API implemented) stops receiving Platform Events after some time (6-10 minutes) from the time we opened the page Dev Org
-------------- Info ------------ I have one LWC, where I subscribe to Platform Events using lightning/empApi . Here the JS code from the LWC : import { LightningElement } from 'lwc'; import { ...
2 votes
0 answers
6k views
Getting the "empApi setting initialized true for : undefined" log in JS console?
I have one LWC, where I subscribe to Platform Events using lightning/empApi . Here the JS code from the LWC : import { LightningElement } from 'lwc'; import { subscribe, onError} from '...
1 vote
0 answers
176 views
CometD in Salesforce Mobile?
I have an app using empApi for desktop subscription to a Platform Event, and the version for Communities replaces empApi with cometD. I'm struggling to find an option for Salesforce Mobile. empApi ...
0 votes
2 answers
758 views
LWC - Cannot Invoke Apex wire service after receiving response from Platform Event using empApi
I am using LWC component in Case Record Page to show Warning Messages. There is no user interaction in this component. Case_Team__c is a Child Object to Case and when data is inserted/deleted/updated ...
1 vote
0 answers
60 views
Update LWC field from future/queuable Apex [duplicate]
I have something here which I thought would be simple but is turning out to be a nightmare. I've created an LWC Setup page where a user can create an Account (it's nothing more than an input field and ...
1 vote
1 answer
838 views
CDC subscription not working in Lightning Web Component
I have enabled the Change Data Capture for my Custom_Object__c and I am trying to subscribe to these events from a Lightning web component using EmpApi of the LWC framework. Here is my code. // ...
0 votes
1 answer
965 views
How to retrieve platform event received in last 5 min or based on custom field catchKey__c? [closed]
We are going to use platform event for our API response which will be directly consumed using empAPI, Just have few question can we retrieve specific event other than replayId field ? Can we retrieve ...
1 vote
0 answers
521 views
lightning/empApi: clarification on replayId param in subscribe method
The LWC Docs describe the replayId parameter in the lightning\empApi subscribe method as follows (emphasis is mine): Indicates what point in the stream to replay events from. Specify -1 to get new ...