How to get log in service portal client script

manishaidhate
Mega Expert

Hi

I want to get log at time of client script side function

As in server side we are using gs.info('logs') to get logs . What we can in client script for same.

4 REPLIES 4

Mihir Mohanta
Kilo Sage

You can use alert() function or console.log in client scripts of Service Portal


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Manisha,



JavaScript that runs on the browser, such as client scripts, can include a call to jslog() to send information to the JavaScript log. More info here.


JavaScript debug window



You can refer below link in case you are looking for info messages on the screen a the client side.


Scripting alert, info, and error messages


jyotisoni
Kilo Explorer

Hi Manisha,



You can use jslog() or console.log() to get log on client script in case of service portal.



Regards,


Jyoti Soni


It will not store this log in any table. I want that log should be stored in log table.