Script Include not returning value

anilkumarkarams
Mega Contributor

Hi,

Can aynone help me out in identifying the error in the following code? My expectation is function should return value , but it is returning value

var IreturnInc = Class.create();

IreturnInc.prototype = Object.extendsObject(AbstractAjaxProcessor, {

  IreturnInc : function()

  {

  var incref = new GlideRecord('incident');

  incref.query();

  if(incref.next())

  return incref.number;

  },

      type: 'IreturnInc'

});

Please help.

Regards,

Anil Karamsetty

1 ACCEPTED SOLUTION

Thanks All for your Coordination. Code is working now. but surprisingly i did not make any changes to the code , i copied the code from my post and pasted in demo instance.


View solution in original post

11 REPLIES 11

Hi Anil,



Can you replicate this in any serviceNow demo instances so that we can take a look.


Thanks All for your Coordination. Code is working now. but surprisingly i did not make any changes to the code , i copied the code from my post and pasted in demo instance.