A client recently asked me for guidance on how to display warning messages on a contact record.

These warning messages need to be dynamic; sometimes none, one, or more messages will be displayed to the user. The requirement was also to have them as undismissable.

If they could be dismissed, my recommendation would have been to use toast messages. Toast messages can be built using a Lightning Web Component (LWC). Alternatively, there’s an easy-to-use AppExchange package called PopUps from Stratus360 which I highly recommend as a no-code solution.

Unfortunately these warning messages had to stay visible so this wasn’t an option.

As with most Salesforce technical decisions, first check to see if there’s an out-of-the-box solution before building something custom.

Enter the Salesforce Lightning Design System (SLDS). According to Salesforce, the SLDS “includes the resources to create user interfaces consistent with the Salesforce Lightning principles, design language, and best practices.”

And wouldn’t you know it, they have cool badges you can use. Yes, it still needs a LWC, but these badges are native to Salesforce, so there’s no need to insert an awkward-looking rich text field on the lightning page.

Instead, you have can something cool like this

The takeaway
Whenever customizing Salesforce, try to use Salesforce resources like the Salesforce Lightning Design System to keep your instance as native-looking as possible. It’ll help adoption and the overall user experience.

Category:
Salesforce