CSM – Catalog not refreshing after selecting a different account (custom button on sn_customerservic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi everyone,
We are facing an issue in Customer Service Management (CSM) after implementing a customization on the sn_customerservice_contact_relationship table.
We added a custom button that lets the user select a different account from a dynamic dropdown. When the account changes, we run logic that updates catalog visibility based on the products tied to the selected account.
Issue:
After switching accounts, the UI does not refresh the catalog visibility.
The system continues to show catalogs associated with the previously selected account, and the only way to correct it is by manually clearing the browser cache.
Steps to reproduce:
User has multiple account relationships.
User selects another account using the custom dropdown button.
Navigate to catalog or customer-facing pages.
Expected behavior:
UI refreshes immediately.
Catalog visibility updates based on the new account.
No cache clearing required.
Actual behavior:
UI displays stale catalog data linked to the previous account.
Catalog visibility updates only after manually clearing the browser cache.
Has anyone experienced a similar caching or refresh issue after customizing account selection?
Any recommendations on forcing a client-side or server-side refresh after changing the contact–account relationship?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @JuanSebastC ,
This behavior is caused by how Customer Service Management (CSM) maintains the active account context. In CSM, catalog visibility and entitlements are evaluated using a session-level account context, not solely from the sn_customerservice_contact_relationship table.
When the account is changed through a custom UI control, the relationship record is updated, but the active account stored in the user session is not refreshed. As a result, the portal continues to use the previous account context and displays stale catalog data. Clearing the browser cache works because it forces a new session to be created.
Try
After updating the account selection, explicitly refresh the CSM session account context and reload the portal/page. This forces ServiceNow to re-evaluate catalog visibility and entitlements for the newly selected account.
Recommended
Where possible, align custom account-switching logic with the out-of-the-box CSM account selector/session handling, as it already manages session refresh and visibility recalculation.
Example (Session Refresh + Reload)
Server-side (Script Include):
gs.getSession().putClientData('csm_account', accountSysId);
Client-side (after account change):
window.location.reload(true);
Please mark any helpful or correct solutions as such. That helps others find their solutions.
