Questions tagged [empapi]
The empapi tag has no usage guidance.
18
questions
0
votes
0
answers
173
views
Getting the "empApi setting initialized true for : undefined" log in JS console?
I currently noticed that I started getting :
empApi setting initialized true for : undefined
log in my JS console :
On the page where I am getting this log I have two LWC's ( from which I Subscribe ...
1
vote
0
answers
20
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
413
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 ...
0
votes
0
answers
235
views
LWC with Platform event call apex controller
I'm refreshing the LWC(data lighting table) using the Platform event. Whenever a lot(custom object) object record is updated and the platform event record is creating via process builder. We subscribe ...
1
vote
0
answers
58
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
0
answers
176
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
622
views
My LWC page doesn't rerender after receiving a new value by EmpApi
I have an issue that when I modify my object, my HTML doesn't rerender
I'm using empApi and my apex class is working fine, the problem here is to rerender
HTML:
<template>
<div class = &...
0
votes
1
answer
123
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 ...
0
votes
0
answers
105
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 ...
1
vote
1
answer
111
views
How to update global variable in emp-api
I need to update a global variable when a push topic is created.
import { LightningElement, track,api } from 'lwc';
import { subscribe, unsubscribe, onError, setDebugFlag, isEmpEnabled } from '...
3
votes
1
answer
447
views
LWC + Apex from EMP Api callback : Firing dispatch event or an apex call from Streaming api callback fails in LWC, any workaround?
When a dispatch event or an imperative apex call is made from a streaming api callback, then it throws this error in browser console window and reloads the page .
{"event":{"descriptor&...
0
votes
0
answers
116
views
How to keep the session alive while subscribing push topic using lightning empApi?
I have a requirement to subscribe to push topic for which i have implemented using lightning empApi and have open the browser in a VM for continuous reading of events and do some actions. The issue is ...
3
votes
1
answer
285
views
How to use LMS & EMP-API in the same LWC component
As both empApi and LMS require the import of the subscribe and unsubscribe methods. How can you use both within the same component?
import { subscribe, unsubscribe} from 'lightning/empApi';
import { ...
0
votes
1
answer
451
views
showToast from messageCallback function of empApi
I have an empApi subscription to a Platform Event. When that event fires, I want to pull data from its fields and showToast.
I'm copying the code straight from the docs, and I can get the platform ...
3
votes
1
answer
536
views
Test lightning-emp-api
Can we simulate an event subscription in LWC unit test? I have a lightning web component using lighting/empApi like,
export default class ExampleComponent extends LightningElement {
...
1
vote
1
answer
127
views
Empapi lightning web component callback which type
I am developing a simple component to call external service in AWS Which will create PDF file in the s3. When the PDF is created the service will change the object status. Is it possible to use empapi ...
2
votes
1
answer
4k
views
LWC - empApi for publishing and subscribing platform event from Lightning web component
I am new to LWC and trying to implement empApi for publishing and subscribing platform event from LWC.
Salesforce provided an example on:
https://developer.salesforce.com/docs/component-library/...
1
vote
1
answer
935
views
LWC emp API track field is not rendering
I am trying with small example of emp API, everything works fine I am able to subscribe and unsubscribe, however, the response of CDC not printing in the UI for some reason.
May I am missing a small ...