g_form.setDisplay('variable_name', false); not working in service portal

ARNAB3
Giga Expert

g_form.setDisplay('variable_name', false); not  working in service portal where as its working in legacy view properly   - what  I need to do  to make it work in service portal.

1 ACCEPTED SOLUTION

Dhananjay Pawar
Kilo Sage

Hi,

May I know, in which script you are applying this?

Check UI type of script it should be set to ALL

View solution in original post

5 REPLIES 5

christopher cre
Kilo Guru

Hi,

Try with .setVisible('variable_name', false);

GlideForm - setVisible(String fieldName, Boolean display)

 

As mentioned in the documentation, Use UI Policy rather than this method whenever possible.

Best regards,

Dhananjay Pawar
Kilo Sage

Hi,

May I know, in which script you are applying this?

Check UI type of script it should be set to ALL

asifnoor
Kilo Patron

Hi Arnab,

Better to use Catalog ui policy and make it visible/hide instead of using form fucntions. Not all functions are supported in service portal. Also try out g_form.setVisible

Mark the comment as a correct answer and helpful if this answers your question.

Sudhanshu Talw1
Tera Guru

The best way is to use Catalog UI policy.

 

Thanks

Sudhanshu