I wanted to hide On hold Reason field when state is not on Hold in Sys_popup view, but I am not getting how can we achieve this?

SHARVIL SHETH
Tera Expert

I wanted to hide On hold Reason field when state is not on Hold in Sys_popup view, but I am not getting how can we achieve this?

 

find_real_file.png

 

7 REPLIES 7

Saiganeshraja
Kilo Sage
Kilo Sage

Write a UI policy and apply your when to run condition .Make sure to select the view in the view field of the UI policy .

 

If unable to find the view field in UI Policy make sure to click on advanced view or add it from the form layout.

 

Mark correct and helpful.

Thanks but I already tried with UI Policy but no use.

Musab Rasheed
Tera Sage
Tera Sage

Hello,

Here is the sample script, Please write onload / on change whatever suits your requirement

function onLoad() {

     //Type appropriate comment here, and begin script below

     var view = getView();
var state = g_form.getValaue('state');

   if (view == 'syspopview' && state != 'onhold'){  

   g_form.setDisplay('onhold','false');

   }

}
Please hit like and mark my response as correct if that helps
Regards,
Musab

It's still not working.