g_form.removeOption not working on the Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 01:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2025 11:53 AM
It is marked as Global, but still its not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The options for the state field are controlled via the process definition ootb code for SIR. What I think is occurring in your situation is that the OOTB client script "sn_si_incident state process" has an AJAX call which is overwriting your g_form.removeOption() once it completes since it is slower.
We do not recommend editing the process definitions and code, however if you do decide that this change is necessary there are potentially 3 options.
1. Edit client script sn_si_incident state process's return function to include your requirements regarding state
2. Edit the existing process definitions script include to align with your vision (don't recommend)
3. create a completely custom process definition (I would duplicate an existing one to make minor edits of as to not miss anything critical)
Relevant code to look at:
Client Script:
sn_si_incident state process
Script Includes:
sn_si.ProcessDefinitionAjax
sn_si.ProcessDefinition
sn_si.ProcessDefinition_NIST_Open
sn_si.ProcessDefinition_NIST_Stateful
sn_si.ProcessDefinition_SANS_Open