The CreatorCon Call for Content is officially open! Get started here.

hide/show related list with dynamic condition is not working

Leonel Sandroni
Tera Guru

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.

LeonelSandroni_0-1690502021122.png

Scripts:

LeonelSandroni_1-1690502062251.png

 

Has anyone experienced a similar issue?

 

 

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

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)

View solution in original post

2 REPLIES 2

Tony Chatfield1
Kilo Patron

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)

Harish KM
Kilo Patron
Kilo Patron

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
}

}

Regards
Harish