gs.log not working in script include

e_wilber
Tera Guru

I have a very simple script include and I can't get the gs.log to work so I'm not even sure if it's being called correctly.

Below is the script include named cab with function cabCheck.

find_real_file.png

 

In the report I am calling this using javascript: new cab().cabCheck() and javascript: new cab.cabCheck(). In reviewing the log files, I do not see "cab check" anywhere so I don't know if the report is actually calling my script include or if gs.log doesn't work in it or if the script include isn't set up right.

Any ideas what's not working?

11 REPLIES 11

Thank you! That is a step in the right direction but the gs.log still doesn't work.

I did another test below as I was wondering if the log wasn't working or if the script wasn't being called.

My report does return the sys_id below and shows it on my report as I was hoping it would but the gs.log doesn't get recorded. The issue I am having is my actual script include is much longer and isn't working properly so I wanted to start gs.logs to debug it but I can't get it to output anything, even in the below scenario. 

Is there another way to record the log so I can see it for testing?

var cab = Class.create();
cab.prototype = Object.extendsObject(AbstractAjaxProcessor, {
cabCheck : function(){
gs.log('testing cab');
return 'f7afd512dba9530061ecd6fa4b9619ea';
},

type: 'cab'
});

Mike Patel
Tera Sage

Below works for me;

On report filter add javascript:new report_rows().runReport();

find_real_file.png