Show Error/Info message on Configurable workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2025 12:18 AM
We want to display error/info messages in the Workspace. We tried using addInfoMessage/addErrorMessage, but they only work on one form.
Is there any other functionality that lets us show validation errors—e.g., date validation—in the Workspace, and that can also be dismissed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2025 03:36 AM
will have to check on that part then.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2025 12:38 AM
Do you mean field messages? You can use the same way we use for native UI but make sure your client script UI Type is set to 'All'.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2025 05:27 AM - edited ‎06-03-2025 05:29 AM
Hi @Ranjane_Omkar ,
on success event for your DR that is returning the validation add client script. In that client script grab the result of the validation and decide which type of alert you trigger from that script.
const result = api.data.<yourDR>.result
if(result.validation) {
api.emit('NOW_UXF_PAGE#ADD_NOTIFICATIONS', {
id: 'alert_1', => ID OF ANY OF YOUR MODAL OR ALERT COMPONENT
status: 'high', => HERE YOU CAN DYNAMICALLY DECIDE WHICH TYPE OF ALERT YOU NEED INFO, CRITICAL etc.
icon: 'info-circle-outline',
content: message, => PLEASE HERE YOUR MESSAGE TO USER
action: { type: 'dismiss' } = > THIS WILL ADD ABILITY FOR USER TO DISMISS THE MESSAGE
});
}