Display info message on Risk Event record when a Risk Event Entry is added
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Team,
I want to display an info message on the Workspace Risk Event record when a Risk Event Entry is added in the related list.
After it is saved and created then I want to display the message as "Please review the 'Risk Event Impact' as the new Risk Event Entry is added ".
Please assist me how to implement this requirement.
Thanks,
Majji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
54m ago
Hi @Majji Koteswar1 ,
In Workspace you typically cannot rely on gs.addInfoMessage() like in UI16, so the clean approach is to set a flag on the parent Risk Event when a Risk Event Entry is created, then display a banner or info message on the Risk Event form based on that flag.
Recommended implementation
Add a flag field on Risk Event
Create a field on the Risk Event table, for example:
u_new_entry_added (True/False), default false
Optional for audit:
u_last_entry_added_on (Date/Time)
u_last_entry_added_by (Reference to sys_user)
Business Rule on Risk Event Entry
On the Risk Event Entry table, create an After Insert Business Rule:
(function executeRule(current, previous) {
// Replace with the correct reference field from Entry to Risk Event
var re = current.risk_event.getRefRecord();
if (!re || !re.isValidRecord()) return;
re.u_new_entry_added = true;
re.u_last_entry_added_on = new GlideDateTime();
re.u_last_entry_added_by = gs.getUserID();
re.update();
})(current, previous);
This ensures the parent Risk Event knows a new entry was added, regardless of whether it was created from the related list, API, or integration.
Show the message in Workspace
In UI Builder on the Risk Event Workspace page:
Add an Alert or Notice component with visibility condition:
Show only when u_new_entry_added = true
Message text:
“Please review the Risk Event Impact as the new Risk Event Entry is added.”
Reset the flag after review
Add a UI Action like “Mark as reviewed” to set u_new_entry_added = false, or clear it automatically when the Impact section is updated.
This pattern is stable in Workspace and avoids issues with modal saves and client side timing.
Hope this helps.
