How to hide a choice from a list in SOW

Community Alums
Not applicable

I have read that g_form does not work in workspace.
Ideally would have used the g_form.removeOption, but what can I use alternatively to achieve this.

Places where I would like to apply this is on the State field to prevent a ticket from directly being updated to Closed.
Both in record and list view.
**Update
Sorry for the confusion.
The article I read was for Agent Workspace and I am asking for Service Operations Workspace.
I just tried now and it worked but not in the list Edit.
But the problem still remains as an incident can be directly updated to Closed by updating via List Edit in SOW 
**Update 2
attached screenshot of where the state was not removed

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Community Alums 

g_form works but addOption() or removeOption() doesn't work on workspace

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Community Alums
Not applicable

@Ankur Bawiskar 
Sorry for the confusion, the article I read was about Agent Workspace and my question was for SOW.
So the removeOption() worked,, but there was still a way to access the Closed stated via the list Edit which I also want to remove 

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Community Alums ,

You can refer below thread.

add/remove options with client script not working in agent workspace 

 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Community Alums
Not applicable

Hi @Gunjan Kiratkar ,
I was able to accomplish one part but still need to remove the Closed state as a choice in the list edit in SOW.
The thread seems to be for removing states within the record.