We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to store data for the current user session in UI Builder?

Tejas Adhalrao
Kilo Sage

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.

  • sessionStorage is 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!

0 REPLIES 0