jslog() method is not writing anything to JavaScript Log

ShishirG
Kilo Expert

I am testing various debugging options in the "Client script" and added few likes using jslog() method which I expect to see in "JavaScript Log" section but it is not visible.

I have refreshed browser session and also reloaded the form and enabled the Java Script logging from settings menu but still it is not showing the relevant jslog messages.

However same messages are appearing in browsers console log though which suggests there's no problem with the one liner demo client script I have written.

I am using Istanbul release. Is there anything I am missing here? I've got through docs and can't find any other option to be enabled to see these messages in ServiceNow's JavaScript Log windows.

Field watcher is working OK.

Thanks,

Shishir Gupta.

1 ACCEPTED SOLUTION

ShishirG
Kilo Expert

I recently upgraded instance to Istanbul and issue is resolved with no other modification. Now I can see jslog messages in JavaScript Log window.


Not sure if this was broken with Helsinki latest patch 9a I was on when issue was reported.



Regards,


Shishir Gupta.


View solution in original post

6 REPLIES 6

balaji_charapal
Kilo Guru

Hi Shirshir,



Can you provide your script to review, you also can your alert() function.


Client Script is as simple as below just to test jslog message. Alert is OK but very interrupting.



function onSubmit() {


  jslog(">>>>>>>This message is from jslog().");


}



So this is only appearing in browser console log.


Yes ShiShir, this will work only when you submit the form, Please follow the below steps.


find_real_file.png



You also can refer below links for more information


JavaScript log


http://wiki.servicenow.com/index.php?title=JavaScript_Log#gsc.tab=0


Balaji,



All these usual steps are done and message not appearing in javaScript Log hence why the question/issue is raised.



Using similar one liner code for onLoad or onChange isn't pushing line in JSLog window.. however same is appearing in console log.



Is there a known issue with latest patch upgrade of Helsinki Patch 9a to which this is upgraded recently?