Silas, or anyone. When I use:
(function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
var ShortDesc, returnVals;
var TOnam = request.pathParams.state;
if (TOnam ==2 )
{
var body = [];
var gr = new GlideRecord('change_request');
gr.addQuery('state', TOnam);
gr.query();
while (gr.next())
{
body.push({Number:gr.getDisplayName('f2601aa6e131330078502406b633334b'),
GroupName:gr.getDisplayName('76601aa6e131330078502406b6333351')});
}
return body;
}
})(request, response);
I only receive two quotes as my return, " "
Also, the sysid's are, 1st number, 2nd assignment_group. I tried using the names and the same " " is returned.
Help anyone.