Urgent !!!!! Not able to update call state field from rest api

madanm7786
Mega Guru

Hi All,

We are not able to update State field in Call table from rest user. I checked all the business rules and data policy no restrictions. Write access is there for State field for Rest user. But still not able to update State. I am testing using rest api explorer by impersonating as rest user.

I can update all other fields in call table but State is not updating. From the UI Rest user can update the State field.

And strange behavior is, i tested even as admin, but still i cannot update State field field through rest api.

Can you please help. I checked as per my knowledge but did not find any issue. This is bit urgent.

Thanks,

Madan

1 ACCEPTED SOLUTION

madanm7786
Mega Guru

Hi All,

Thanks for your help.

I think i found the issue.

Read only was set in the dictionary level of that field. I removed the read only from dictionary level and it is working. Call state field is updating from rest api.

Thanks,

Madan

View solution in original post

8 REPLIES 8

johnfeist
Mega Sage
Mega Sage

Hi Madan,

If by the Call table you are referring to new_call, there is no OOTB state field.  If you have a state field on that table, it's likely name is u_state.  Could that be the issue?  If you are not working with new_call, please supply the table name.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Hi John,

Our's is a custom table. u_call is the table and u_call_state is the field.

find_real_file.png

If you are not working with new_call, please supply the table name. - I did not understand this statement.

can you please let me know where to supply the table name.

 

Hi Madan,

If you are able to update other fields in the record, that says you are accessing the record properly.  The likely causes of the failure to update would be:

  • As Ankur points out you have an error in the column name. 
  • The value that you are trying to apply is not valid.  This can be tricky.  If state is an integer and you try to apply a value of "In Progress", it won't work.
  • You may have background objects, business rules, data policies, etc. that kick in and reverse the action.  I had that on one case and it took a lot of digging to find the culprit.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

 

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Madan,

Are you referring to the correct field on that table

Regards
Ankur

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