Skip to content

Get your Salesforce users informed of a completed asynchronous process (@future, queueable, batch...) with a toast notification and refresh pages users are viewing with rollback data if an error occured, all thanks to a platform event.

Notifications You must be signed in to change notification settings

RemiLeGuin/asynchronous-process-notifier

Repository files navigation

Asynchronous Process Notifier

Get your Salesforce users informed of a completed asynchronous process (@future, queueable, batch...) with a toast notification and refresh pages users are viewing with rollback data if an error occured, all thanks to a platform event.

Only works for Lightning experience on desktop!

To know and understand the purpose of platform events, please review the following Trailhead modules:

Installation:

Install the unlocked package by clicking one of the following URLs:

Then, follow these configuration steps:

  1. Go to the Salesforce instance and go to 'Setup' &rightarrow 'Apps' &rightarrow 'App Manager'.
  2. Edit the Lightning app of your choice and navigate to 'Utility Items' section on the left.
  3. Add the 'Asynchronous Process Notifier (LWC)' OR the 'Asynchronous Process Notifier (Aura)' utility item. Do not forget to set 'Start automatically'.

IMPORTANT: A Lightning Web Component cannot subscribe to a Platform Event if there is already an Aura component that is subscribing to a Platform Event in the same Lightning Page. It is a known issue. Then, if an existing Aura component in your user interface uses the lightning:empApi component, use the Aura version of the Asynchronous Process Notifier.

Test:

About

Get your Salesforce users informed of a completed asynchronous process (@future, queueable, batch...) with a toast notification and refresh pages users are viewing with rollback data if an error occured, all thanks to a platform event.

Topics

Resources

Stars

Watchers

Forks