Trying to change State via API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2017 01:08 PM
Hi all!
I'm working with an integration acct that is creating/updating Incident tickets in ServiceNOW and am struggling with the ability to update State specifically. My implementation has some customizations including renaming of some fields, so we call State = 1 "Opened" (not new), and it is the state that a ticket is in prior to being assigned to a technician.
I'm having an issue that when I try and transfer a ticket via REST to another team and set the assigned_to value to null, the State value stays "2" (i.e. in progress).
Is State meant to be an editable / overridable field via API? Even when I explicitly define state = "1" in my call, it will not override to Open.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2018 03:29 PM
We have also encountered this issue. We are trying to change the state of a Change Control via REST automation. There is no error thrown and other field updates in the same call are able to be made successfully. Our ServiceNow admin in god mode also is unable to change the state using the API Explorer. We've escalated to the vendor and they have confirmed the issue and are investigating. I'd encourage you to do the same to help expedite the fix. I'm expecting that a patch update will be required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2018 05:54 AM
Hi,
I've ran into the same problem, trying to change the State field via query with no effect. Do you know whether this problem has been fixed since?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2018 08:07 AM
I ran into this myself today on Jakarta. It works as an admin via REST API Explorer but not as an end user. The end user can update the state via the UI but not via any REST calls, even REST API Explorer. SOAP works, but not REST. I found a workaround though from another post: https://community.servicenow.com/community?id=community_question&sys_id=f00b8baddb5cdbc01dcaf3231f961998
Basically, REST is not honoring the existing change_request.state ACL that should allow ITIL members to update the state. So I created a new write ACL on change_request.state for the rest_service role. I tinkered a bit with a script in the ACL and it still breaks if I include current.active in the logic to return a true. But as long as I don't leave that particular logic in the script it works just fine from REST now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2020 12:55 AM
Facing the same issue, "comment and the state ", is not getting updated/ modified in the Api response .
Though i can see the comment in the ticket, Not sure , but please check and get back
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 06:01 AM
We ran into the same problem on change_request. We could change the state in the UI, but not via an API.
Our issue was related to a dictionary override that was setting change_request.state to read-only. We disabled the "override read-only" on the dictionary override and used a UI policy to restrict changing the state from the UI. That solved the problem for us.