Announcements Widget dismiss functionality
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 09:10 AM
Hello,
Would anyone know how to recreate the dismiss announcement functionality that's present in the announcements banner?
I've created a custom announcements widget and I'd like to replicate the dismiss functionality there but I'm not sure what record(s) need updated when a user dismisses an announcement. Does anyone know what tables are involved or how to view the existing functions?
Thanks
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 09:15 AM
Dismiss functionality is already handled OOB with a client script.
You can utilize same code and retrofit in your widget.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2022 10:20 AM
Thank you Sachin, I wasn't even sure where to start so this helps a great deal.
However, I'm struggling to understand the code and I haven't had much luck trying to debug it (never seems to hit conditions). Which method runs when I dismiss a banner announcement from the Portal? onSubmit() seems to apply more to creating the announcement.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2024 08:46 AM
I thought the old ui16 announcement feature used to create a user preference record to track whether you had dismissed announcement or not. if you wanted it to reappear for all users, you could go delete specific user_pref records for all users etc. not sure what script created those entries, nor what kind of code checked for it in the first place to display or not. but that feels like being involved.