Rest Response error display_value=null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2016 02:12 AM
Hi All,
While sending REST POST request, I am getting below response. If i am sending category parameter it is setting display value and creating record.
"error":{
"message": "java.lang.NullPointerException: null value in entry: display_value=null",
"detail": "null value in entry: display_value=null Check logs for error trace or enable glide.rest.debug property to verify REST request processing"
},
"status": "failure"
Could you please help me to resolve this issue.
Regards,
Abhishek Verma
- Labels:
-
Integrations
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2016 02:32 AM
Hi Abhishek,
Can you please check the response code as well ?
Regards,
Vikas Malhotra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2016 02:34 AM
Hi Vikas,
I have not written any response code... it is automatically generated... This is for scoped application(security incident)... when i am trying with global application (incident) , i am getting correct response..
Regards,
Abhishek verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2016 02:51 AM
Hi Abhishek,
Can you run this script in the background script and let me know what is the response code that you see?
var request = new sn_ws.RESTMessageV2();
request.setEndpoint('https://<YOUR INSTANCE>.service-now.com/api/now/table/<TABLE NAME>');
request.setHttpMethod('POST');
//Eg. UserName="admin", Password="admin" for this code sample.
var user = 'admin';
var password = 'admin';
request.setBasicAuth(user,password);
request.setRequestHeader("Accept","application/json");
var response = request.execute();
gs.log(response.getBody());
gs.log(response.getStatusCode());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2016 03:08 AM
Hi Vikas,
Thanks for the help, I found the issue. There are two fields on security incidnet and sm_order table with display value true. so it is overwriting the other value as we are not passing category so it is giving display_value=null.
Regards,
Abhishek verma