g_form.setDisabled not making checkbox variable grayed out on platform view

shikha Gandhi
Tera Contributor

I have on change catalog client script to make checkbox variable grayed out using g_form.setDisabled function.

 

Same function making checkbox grayed out in portal view but in internal view not working.

 

Is there any restriction g_form.setDisabled() function don't work on platform view.

9 REPLIES 9

Already tried  g_form.setReadOnly(), still same issue working in platform view not in internal view.

Hi @shikha Gandhi  , can you set the UI type to ALL if not already set

Ui type already set to all, it's that setdisabled()  and setReadonly both are not working on checkbox variable in internal view.

 

shikha Gandhi
Tera Contributor

catalog client script attached , same script working for portal but not for desktop. if i use setReadOnly(), it's not working for checkbox variable. however readonly logic if adding to text variable it is working in both view.

Hi @shikha Gandhi ,

 

For fields on the form use g_form.setReadOnly('<fieldName>', true);

For catalog variables use g_form.setReadOnly('variables.<variableName>', true);'

Hope this helps to resolve your issue. If it does not, then try to achieve the same through UI Policy.

 

Thanks & Regards,

Anitha H V