How to store data for the current user session in UI Builder?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi everyone,
I'm working with UI Builder (Now Experience) and have the following requirement:
-
When a user opens the page for the first time in a login session, the acknowledgement container should be displayed.
-
Once the user clicks Acknowledge, the acknowledgement should be hidden.
-
If the user revisits the same page during the same login session, the acknowledgement should remain hidden.
-
After the user logs out or the session expires and they log in again, the acknowledgement should be displayed again.
Constraints:
-
gs.getSession()is not available in my environment. -
sessionStorageis not accessible from UI Builder client scripts.
Is there any supported ServiceNow approach to store data only for the duration of a user's login session or detect when a user's session ends in UI Builder?
Thanks!