Title: Catalog UI Policies Not Working in HR Agent Workspace When Impersonating Another User

ghitabahaj
Tera Expert

Hi everyone,

I'm working on an HRSD implementation in ServiceNow and have configured several Catalog UI Policies on variables associated with an HR Record Producer.

The policies work as expected when I access HR Agent Workspace using my own account. However, when I impersonate another user and open the same HR case in HR Agent Workspace, none of the Catalog UI Policies seem to execute.

The affected variables are part of an HR Benefits Case, and the policies are intended to control variable visibility and behavior based on certain conditions.

I've already configured the UI Policies and their associated UI Policy Actions on the Record Producer variables.

 

does anyone of you faces this issue before?

6 REPLIES 6

Max Dore
ServiceNow Employee

When impersonating this user, do other RP's variables behave correctly in the agent workspace? Or is it ONLY this one that is causing issues?

For this testing's purpose I would check the impersonation in system properties is turned off.

You mentioned there are multiple policies, did you test their success/pass after each one was configured? I ask because I wonder if they are conflicting with one another and therefore to deactivate all but one and then test each time you activate another. Can you paste a screenshot of the policies?

 

Ana Vitoria G_e
Tera Contributor

Hello,
I’m having the same problem as you. My user, who is an admin, can view the fields correctly within the Workspace and in the platform’s UI. When impersonating a non-admin user, the Catalog UI Policy does not work correctly, and the user ends up seeing fields that should be hidden, while the fields they should actually see are not displayed. This issue only occurs within Workspace, because when opening the record in the platform UI, the non-admin user sees the fields correctly in accordance with the Catalog UI Policy.
My temporary solution to this problem will be to use Catalog Client Scripts to validate which fields should or should not be visible.

I actually tried with the catalog client script but it didn t work as well

When you open the record in the UI Platform while impersonating the user, do the catalog UI policies work as expected?

Are you using `g_form.setVisible();` in the catalog client script?
One of the tests I ran was to disable the UI Policy and see if it stopped working when I disabled it while logged in as my admin user.