Custom field not been able to update using the API post methods

siddharth8611
Mega Explorer

Hi All,

 

We have an issue with the custom field u_tenant which is created in the Incident , and it has choice values IT,HR. and when we do an API call POST,PUT, it updates the tenant with IT and HR but its not consistent , frequently it does not work like say it created a incident with tenant but again if we try after 15sec it does not create a value in the tenant field but incident is getting created.

could you please let us know where we have the issue any suggestion will help us.

 

this is the payload we are sending.

 

curl -s -X PUT "https://sealedairdev.service-now.com/api/now/table/incident/<sys_id>?sysparm_fields=number,u_tenant" ^
-u "<user>:<password>" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json" ^
-d "{\"u_tenant\":\"IT\"}"

 We have checked the ACL , Business rule and flow logic all seems to be okay but still there is inconsistency 

any help suggestions on this 

thanks

Sid

3 REPLIES 3

Hemanth M
Tera Sage

Hi @siddharth8611 ,

 

What's the backend value of IT, HR choice,  is it the same as Label?

 

 

 

Vishal Jaswal
Tera Sage

Hello @siddharth8611 

1. Use REST API explorer to test multiple times and if there is no issue then you should not face issue with your API call too.

2. Use the choice value instead of label in -d "{\"u_tenant\":\"IT\"}"

3. Once the incident is created, share the json response.

4. Go to incident's list view and find out the values of Created, Updated, Created by, Updated by and u_tenant.

Hemanth M
Tera Sage

Hi @siddharth8611 ,

 

If this response helped, please close the loop by accepting the solution or ask a follow-up question.