State field is not getting updated via REST API explorer

Niranchana1
Tera Contributor

Hi,

we have a custom request table which follows state flow procedure. we are trying to update the state field from 'inprogress' to 'Awaiting Approval/Pending' via REST Table API explorer but it is not getting updated and there is no error.

It shows 200 status. 

The state changes are handled via UI action only by end users & Admin users.

When we use state flows, REST API will not update the state field?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Few things to check

1) Is that state field readonly at dictionary level - if yes then you cannot update it from API

2) Is there any field level WRITE ACL which is restricting that API user from updating

Regards
Ankur

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

View solution in original post

11 REPLIES 11

I have checked it, the conditions are getting passed but still the state is not getting updated.

Any idea?

I just found that state field to 'read only' in dictionary override for the custom table

That's what was mentioned in my 1st reply.

Glad that it helped.

Regards
Ankur

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

Harsh Vardhan
Giga Patron

 

Make sure state field is not read only. 

I tried to reproduce this on my personal instance , I applied state flow on incident table and updated the state using table API "PUT" method.

Is the state getting updated for u via table api?