AX - Alert
Overview
AX - Alert is a Lightning App Builder component that displays important messages directly on your record, app, and home pages.
Use it to show system alerts, error messages, warnings, or status updates that users need to see. You control when alerts appear, what they say, and how they look—all configured right in App Builder without code.
Getting Started
Use this simple tutorial to learn the basics of the Alert component and start building your use cases.
Use Cases
Opportunity Page: Alert users to missing fields or pending approvals before stage advancement.
Case Page: Show errors when SLAs are breached or key data is missing.
Custom Object Page: Notify users of restricted access or pending validations.
System Status Panel: Alert to platform outages or connectivity issues with the Offline variant.
Daily Announcements: Share company-wide reminders or policy changes.
Compliance Notices: Display role-specific compliance alerts.
Configuration
Add the Alert component to a Lightning page in App Builder, then configure it in the Properties Panel.
Basic Properties
These control the appearance and behaviour of the Alert component.
Variant
String
Defines the alert’s style and tone. Options: base, error, offline, warning.
warning
Content
String
The main message text displayed inside the alert (supports dynamic values like {{Record.FieldApiName}}).
"Please complete {!Record.Name} details."
Icon Name
String
SLDS icon name to reinforce the message visually (e.g., utility:warning).
utility:error
Dismissible
Boolean
Shows a close button if true, allowing users to dismiss the alert.
true
Textured
Boolean
Adds a textured background if true, enhancing visual distinction.
false
Best Practice: Use variant to match the message’s severity (e.g., error for failures); bind Content to record fields for dynamic updates. Test on different page layouts.
Variant Guidelines
base
Neutral info (e.g., tips, status updates).
utility:info
error
Blocking issues (e.g., save errors, permissions).
utility:error
offline
Connectivity problems (e.g., network issues).
utility:offline
warning
Cautionary alerts (e.g., missing fields).
utility:warning
Note: Dynamic values (e.g., {{Record.FieldName}}) are supported only on Lightning Record Pages to pull field data at runtime.
Use Case Examples
Example 1: Add a Conditional Alert for Missing Opportunity Amount
Scenario : Create a general reminder alert that encourages sales reps to maintain complete opportunity records by ensuring critical fields like Amount and Close Date are populated.
Prerequisites
Create a checkbox formula field on Opportunity to evaluate as true when the opportunity Amount is empty
AmountIsEmpty__c
Configure the AX - Alert Component on your Opportunity page
Variant:
warning(yellow warning styling)Content:
Key fields are missing. Please complete the Amount to ensure accurate pipeline reporting.Icon Name:
utility:warning(warning triangle icon)Dismissible:
false(users cannot close the alert)Textured:
true(enhanced visual styling - optional)
Set Up Conditional Display
Optimize Display with Visibility Rules: Utilize Lightning Page's "Set Component Visibility" feature to control when the alert appears, tailored to your specific business needs. This ensures the alert is shown only in relevant situations rather than on every page
For this use case, set the rule to AmountIsEmpty = True
Result: Users see a textured warning alert on the Opportunity page.
Example 2: Set dynamic alerts on Opportunities
Display different messages with styling and component visibility to make alerts more dynamic. Create a two level alert to illustrate varying field importance.
Configure the first AX - Alert Component on your Opportunity page
Variant:
warning(yellow warning styling)Content:
Key fields are missing. Please complete the Amount to ensure accurate pipeline reporting.Icon Name:
utility:warning(warning triangle icon)Dismissible:
falseTextured:
true(enhanced visual styling - optional)
Key Considerations
Variant Selection: Choose the variant based on message urgency (e.g., error for critical issues).
Dynamic Content: Use {{Record.FieldApiName}} on Record Pages for real-time data (e.g., {{Record.Name}}).
Visibility Control: Pair with Set Component Visibility to show alerts conditionally.
Performance: Keep Content concise to avoid page load delays.
Accessibility: Ensure text contrasts with the background; test with screen readers.
Troubleshooting Common Issues
Alert Not Showing: Verify the component is added to the page and Variant is set. Check page permissions.
Dynamic Content Fails: Ensure the field API name (e.g., {{Record.Amount}}) matches the object and is accessible.
Dismiss Not Working: Confirm Dismissible is true and the Interaction is configured.
If Issues Persist: Contact our support team at [email protected] for assistance.
Summary
The Avonni Alert component enhances Lightning pages with customizable, context-aware notifications. It’s ideal for real-time updates and user guidance.
Last updated
Was this helpful?
