- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 02:56 AM
Hi Team,
I need to hide Closed and Cancelled state choices. and i have wrote onload client script.
g_form.removeOption('state' , 'closed') its not working.
And i have to hide on hold and resolved, when state is New. How can i do this?
Thanks in Advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 03:13 AM
@Atchutaram Here is the code you should use to remove the closed state.
g_form.removeOption('state', '7'); //closed state
Here are the state values.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 02:59 AM
Hi @Atchutaram
May i know , what is reason to hide these? Any business case, because hiding may cause impact on process.
See Anurag reply.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 03:13 AM
@Atchutaram Here is the code you should use to remove the closed state.
g_form.removeOption('state', '7'); //closed state
Here are the state values.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 03:16 AM
Hi,
You need to pass the value of the choice as the second parameter (not label). Please check if you are doing that.