- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2016 02:01 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2016 03:50 AM
Just remove the global. Refer to the modified script below:
var counttest = Class.create();
counttest.prototype = Object.extendsObject(AbstractAjaxProcessor, {
counttest: function() {
gs.info ('AAAA:This script is executing');
var gr = new GlideRecord('incident');
gr.query();
if(gr.next())
{ //Added this one
gs.info("info");
var datedif = gs.dateDiff(gr.sys_created_on,gs.nowDateTime(), false);
gs.info('AAAA:'+datedif);
return datedif;
}
},
type: 'counttest'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2016 12:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2016 12:22 AM
which servicenow version are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2016 02:38 AM
i am using Helsinki Version of Servicenow.