1

We have a lightning cmp. as a utility bar item. This cmp. is showing a list view of leads. When a lead in the list is clicked the lead opens in the main area. I want to have the utility bar cmp. refresh if an update is made to the lead, specifically I want the list view to auto refresh to not show this lead anymore, if it does not meet the filter condition.

Can the utility bar cmp. auto refresh based on a change of a record in the database?

1 Answer 1

1

If you have CDC (Change Data Capture), you can subscribe to changes to Leads in your component, and when you detect a change, you can refresh the list. Alternatively, you can also use the Streaming API to subscribe to a push topic for leads, as described in the documentation. You just need to use the lightning:empApi (Aura) or pubsub module (LWC).

2
  • I was hoping for something native. Can CDC be used internally or only with External Objects?
    – Dedo
    Commented Apr 12, 2020 at 10:07
  • @Dedo Yes, CDC works internally.
    – sfdcfox
    Commented Apr 12, 2020 at 14:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .