I am using Node.js and var GlideRecord = require('servicenow-rest').gliderecord;
for creating and updating a ticket in ServiceNow.
I am able to create a ticket through node code and getting the sys_id but I am not able to close the ticket. I am not getting any response or errors either.
Here is the code snippet:
gr = new GlideRecord("xxx", "yyy", "zzz", "aaa");
var obj2 = {
comments: "Ticket closed",
state: "7",
}
gr.update(sys_id, obj2).then(function (error, response) {
console.log(response);
console.log(error);
});
How can I solve this problem?