- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 03:18 AM
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.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 03:20 AM
Hi,
May I know, in which script you are applying this?
Check UI type of script it should be set to ALL

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 03:19 AM
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,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 03:20 AM
Hi,
May I know, in which script you are applying this?
Check UI type of script it should be set to ALL

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 03:21 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2020 03:28 AM
The best way is to use Catalog UI policy.
Thanks
Sudhanshu