Sunday, May 19, 2019

Lightning:NotificationsLibrary : Easy Way to Display Toast or Notices in Lightning

In order to display the toast messages, we have to fire standard event "force:showToast". Now Salesforce recommend using lightning:notificationsLibrary for displaying messages in lightning via notices and toasts.

Toast helps in providing information about status on user action.
Notices helps in displaying the system related issue or update about any maintenance.

NotificationsLibrary makes very easy for developer to display notices and toast.

How to display Notices using lightning:notificationsLibrary

Below is sample code:


How to display Toast using lightning:notificationsLibrary

Below is sample code:

Hope this will help!!!

No comments:

Post a Comment