Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

UI Policy condition not working for related fields

Community Alums
Not applicable

Hi Team,

 

I have written a UI Policy on a custom form which is having a reference field called as 'Contact'. I am trying to get the 'partner' field access from account object from the related fields but its not working

I am trying to check if Partner is True then UI Policy should make a field visible but it seems the UI Policy does not work on related objects. Below is the UI Policy but its not working.

Ankur20_0-1725273897793.png

 

I believe its OOB bug?

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Community Alums Your assumption is correct, dot walking on the related fields are not supported in case of UI Policy. The best way to handle this would be via a client script by either making a GlideAjax call or using g_form.getReference();

 

Hope this helps.

View solution in original post

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@Community Alums Your assumption is correct, dot walking on the related fields are not supported in case of UI Policy. The best way to handle this would be via a client script by either making a GlideAjax call or using g_form.getReference();

 

Hope this helps.

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Are you testing this on new record? 

IF yes then its a known error and it wont work -> UI Policy with dot-walked filters does not execute on new records (sys_id=-1) - Known Error (service...

-Anurag