Show a Toast with a New JavaScript Function

Show a toast with the function. A toast displays a message below the header at the top of a view.

Where: This change applies to Lightning Experience, Lightning communities, and all versions of the mobile app. The function is available for Visualforce pages set to API version 45.0.

How: The syntax of the function is:{toastParams})

The toastParams object sets the attributes for the toast, such as the toast title and message. Use any attribute available for the force:showToast Aura event.

The function is a wrapper for the force:showToast Aura event. For details of all available attributes, see force:showToast in the Component Library.


Show a toast on a Visualforce page using{
    "title": "Success!",
    "message": "The record was updated successfully."