POST inserting empty records

martin_chabarri
Mega Expert

I am trying to create records in a custom table via REST. When I post to this class in my DEV instance, all works well. When I moved this update

set to my TEST instance, it creates empty records, BUT, processes an on insert business rule correctly. So the values are there, but not being

displayed on the list or form.

Also, the JSON response is empty (201 Created, no content) in TEST, while in DEV i receive a proper response

Both instances are the same version and patch level, I have checked that the user has the same roles, ACL's are exactly the same also. I just

can't seem to figure out the difference.

Header:

content-type: application/json

authorization: basic

{"u_user":"71fdbafe317560402e9eafeda6b6c67b",

"u_approval_record":"68fec2070ff5c380f77c563be1050ed7",

"u_action":"0"

}

In DEV i get a response:

{

      "result": {

              "sys_id": "241a99c113438300e19cb0322244b076",

              "sys_updated_by": "integrate_account",

              "sys_created_on": "2017-12-13 14:29:40",

              "u_approval_record": {

                      "link": "https://dev.service-now.com/api/now/table/sysapproval_approver/68fec2070ff5c380f77c563be1050ed7",

                      "value": "68fec2070ff5c380f77c563be1050ed7"

              },

              "sys_mod_count": "0",

              "u_action": "0",

              "sys_updated_on": "2017-12-13 14:29:40",

              "sys_tags": "",

              "u_user": {

                      "link": "https://dev.service-now.com/api/now/table/sys_user/71fdbafe317560402e9eafeda6b6c67b",

                      "value": "71fdbafe317560402e9eafeda6b6c67b"

              },

              "sys_created_by": "integrate_account"

      }

}

In TEST i receive only a 201 Created and no body

HELP!

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Martin,



can you try consuming the endpoint for test in postman and check same error/response you are getting.



Regards


Ankur


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

Hi Ankur,



I am using Postman for my testing



DEV


find_real_file.png




TEST


find_real_file.png


Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,


From where you are doing that.



Thank you,
Ashutosh Munot


Ashutosh,



I am using Postman to test, i posted screen shots as a reply to Ankur