- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 07:00 PM
Is the state of case, like 'New', 'Open', 'Closed', 'Cancelled', the un-editable item even with the admin privileges?
Solved! Go to Solution.
- Labels:
-
Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 07:08 PM
You can try client side javascript box, press ctrl+shift+j on the form. Type 'g_form.setValue('state','open'); g_form.update(); and then run the code.
Give this a try, make sure about the 'state name' and 'value'. If this doesn't work the same can be done with the background script of the server-side.
Go to Background Script in left navigation >
var gr= new GlideRecord('tablename');
gr.addQuery('sys_id','valueofsysid');
gr.query();
if (gr.next()){
gr.state=open;
gr.update();
}
and then Run the code.
Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 07:08 PM
You can try client side javascript box, press ctrl+shift+j on the form. Type 'g_form.setValue('state','open'); g_form.update(); and then run the code.
Give this a try, make sure about the 'state name' and 'value'. If this doesn't work the same can be done with the background script of the server-side.
Go to Background Script in left navigation >
var gr= new GlideRecord('tablename');
gr.addQuery('sys_id','valueofsysid');
gr.query();
if (gr.next()){
gr.state=open;
gr.update();
}
and then Run the code.
Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2022 01:18 AM
By default, the Customer Service Case form (in both the Platform UI and Agent Workspace) does not display the State field. State transitions are handled through State Flows (usually executed by an agent through a UI Action, such as a form button).
If you were to add the State field to the form, you will find that agents are able to change the State to Cancelled, and also from Cancelled to Open.
The best practice however is to keep the State field hidden so that agents rely on the UI Actions configured in the State Flows, as they also express the state model for cases and restrict state movements.
In order to enable the cancellation of cases as well as their subsequent reopening using state flows, you will need to create two new entries in the sf_state_flow table (one for each state transition).
See the screenshots below for examples:
Case state flows, including two new ones I created for Cancelling and Reopening cases:
State flow for cancelling cases:
Notice that when you specify a Manual condition, a UI Action is automatically created. To enable this UI Action for Agent Workspace, you must select the corresponding option in the UI Action settings (such as the Workspace Form Button😞
The state flow for reopening cases looks similar, only the reverse: