In onchange client script I'm unable to hide Container start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 01:24 AM
Hi All,
I'm unable to hide container start when onchange of field. I I have written the code onchange client script I'm getting the alert as expected but it is Unable to hide the container start.
please let us know why this is happening .
for more details please find the attached document.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 01:34 AM
hi Sirri,
may be there are mandatory fieldls exists within the container and hence client script is unable to hide the container and fields within it.
Before hiding container with g_form.setDisplay('variable',false) API, make sure, the mandatory variables within the container are set as non-mandatory via g_form.setMandatory('variable',false) API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 01:38 AM
Hi @Sirri ,
Below links might help you.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0745114
Please mark helpful if it helps you.
thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 01:40 AM
Please check this link for root cause:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0745114
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks