- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 04:56 PM - edited 07-27-2023 04:59 PM
Hello everyone,
I have created a UI policy in order to hide/show some related list for the assigned to project user (in project tasks)
The script is fine. I have checked with another conditions and it's working. The problem is the dynamic condition that I need. I have impersonated with assigned project user and he can still see the related lists.
Scripts:
Has anyone experienced a similar issue?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 06:05 PM
Hi, this appears to be a known issue with dynamic conditions and I see the same results in a Utah PDI.
SNC's solution is to use client script in this scenario.
Dynamic conditions applied to a UI Policy fail to evaluate. - Known Error (servicenow.com)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 06:05 PM
Hi, this appears to be a known issue with dynamic conditions and I see the same results in a Utah PDI.
SNC's solution is to use client script in this scenario.
Dynamic conditions applied to a UI Policy fail to evaluate. - Known Error (servicenow.com)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 06:26 PM
Hello, you can use onLoad Client Script for the same example below
var UserID = g_user.userID; //get login user sysid
var getAssignedTo = g_form.getValue('assigned_to'); // assigned to sysid
if (getAssignedTo == UserID)
{
alert("isnide");
g_form.showRelatedList('task_ci');//tablename
}
else
{
alert("else");
g_form.hideRelatedList('task_ci'); //tablename
}
}
Harish