I have a custom community pages which is showing some content based on Account Status. I need to update this section in my custom community page based on any server update on the account status field in Salesforce, in the same session without loading the whole page. I tried platform event and LDS. Emp API is not working in community,so can't subscribe to platform event and LDS doesn't work with server load. Any other possible workaround?


Yes, you can use custom LWC which uses the CometD library from the static resources. It should select the user's sessionId and connect to channel with Streaming API. Create handling events and exceptions similarly to EMP API. It is working in Communities. Check this repository, this example is working fine in Communities! https://github.com/TheVishnuKumar/lwc-streaming-api

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.