I currently have a flow, which calls an apex class on completion.

This class changes my Status/Path of the lead.

I want to refresh the path (lighting component), when my flow finishes or when the apex class is ran.

How can this be achieved?


It could be done by using platform events. Let's assume, you have a lighting component flow starting point. High level of steps are listed as above:

  1. use lightning:empApi component to subscribe to platform events
  2. When the flow starts apex execution, publish event with some status = Started in this case show spinner for a user, that process is performing on background
  3. On apex code, when it is finished. publish event with some status =finished
  4. Handle event caught in lightning component by means of lightning:empApi and refresh view as necessary.

topics that are useful: How to use Platform Event in lightning by using lightning:empApi Emp 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.