What if you want to display a toast message on a record page or a modal popup message to let the user acknowledge some information or launch a screen flow to let the user enter some values when certain criteria are met.
This challenge can be overcome by installing an App called PopUps in the AppExchange in Salesforce.
How to install PopUps app from Appexchange
Click on this Link, you will be taken to the AppExchange Page.
Click the Get it Now button.
Based on your requirement, you can install the app in the Production Environment or a Sandbox.
If you want to install in a sandbox, Click Install in Sandbox button.
Check I have read and agree to the terms and conditions option → Click Confirm and Install button.
It will take you to the Login Page.
Enter the Username and Password → Click Login.
You will be taken to the installation page. → Install for users based on the requirement, here we installed if for all users.
It should take some time to install and once it is finished click Done.
Now the application is installed in the org and you can find it under the Installed Packages option.
Add PopUps Component to a record page
Open any Opportunity record
Open any record → Click Gear Icon → Click Edit Page.
It will open Lightning App Builder → To the left of the canvas scroll down to bottom, you will see two components (PopUp / Modal) under Custom - Managed. The number in braces indicates the number of custom managed components available.
Drag and Drop PopUp Component into the Page.
After adding the component in the page, you can choose the type of Popup.
Title : The title of the PopUp
Pop-up message or flow name : In case of Toast and Modal it is the message that should be displayed on the screen, and in case of Flow it is the flow API name.
Expiry Date : You can set the expiry time for the Popup, the format is (YYYY-MM-DD)
Toast Type : Success, info, other, warning and error
Toast Mode : They are of three types
Dismissible (message will show up to the duration what you set and the
user can close the toast message by clicking x)
Pester (message will show up to the duration what you set and fades away automatically)
Sticky (message will be visible till the user clicks the x)
Toast Duration : The duration in seconds for messages to be displayed on screen.
Set Component Visibility : Add filter and set visibility criteria for the component to be displayed. When the criteria is met the PopUp functionality will be displayed on the screen.
There are different types of toast messages available under this option. Please refer to the below image.
Here we used the Info type toast messages. When the record type changes to lock record type, the info toast message will appear.
The visibility criteria is Record Type Id →equals → “0127h000000UymcAAC” where 0127h000000UymcAAC is the record type Id of the Record lock record type.
When the record type for a record is changed to the Record Lock the toast message automatically appears and it is dismissible.
Here is the toast message of Info type.
The modal is a popup which should be closed in order to perform any other operation on the screen. It forces users to look at the popup and close it.
Here we are going to display the modal whenever the amount filed on an Opportunity is left blank.
Open Opportunity record → Edit Page
Select Modal as the Type
Enter Warning as Title name
Enter Please Fill the Amount in the Pop-up message or flow name option.
In Visibility criteria add Amount field equals to 0, refer to the below image.
When a record which doesn’t have the amount value entered is opened, you will see a modal pop up with a message.
A screen flow can be launched when the criteria is met, so that the user will enter specific values in the screen and fill some values.
Select Flow as a Type.
Setup → select Flow →Click Drop down button on the right corner of the flow → Click View details and versions → Copy Flow API name and paste it in the
In the Pop-up message or flow name option.
The screen flow will be launched automatically when the visibility criteria is met and the user can perform the required operation.
Wrapping it up
In this blog we have covered all the features of the PopUps app from AppExchange.
Leave a Comment