Hi Michael D'Amico


If my solution solved your problem please mark it as correct answer.


Thank You


s_kumar
Mega Contributor

HI Sidarth...



i am using global.AbstractAjaxProcessor   then also its giving same error...



can you please help me in this..


my script include..



var counttest = Class.create();


counttest.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {


      counttest: function() {


              vgs.log ('AAAA:This script is executing');


              var gr = new GlideRecord('incident');


              gr.query();


              if(gr.next())


                      { //Added this one


              var datedif = gs.dateDiff(gr.sys_created_on,gs.nowDateTime(), false);


              gs.log('AAAA:'+datedif);


              return datedif;


      }


},


type: 'counttest'


});


I tried the same thing in my instance and I did not get any error.


Can you let me know if you are using this in an application scope and whether client callable is selected?


s_kumar
Mega Contributor

hey Sidarth ..


My application scope is global ..... and yes i have checked client callable check box ...


and i am also not getting any error   but the output i am getting is NULL