What is console.log() in servicenow

Rama Rao
Tera Contributor

Hi,

How to use console.log() in ServiceNow and how to check?

Thanks and Regards,

RamaRao

4 REPLIES 4

Jaspal Singh
Mega Patron
Mega Patron

Hi Rama,

 

There is already a detail about it. Follow link.

Hi,

Thanks for the quick response. Once apply the console.log in the script, How do I check?

Voona Rohila
Mega Patron
Mega Patron

Hi rama rao

There are multiple different debugging logs available in servicenow for client side and server side scripts. console.log() can be used on client side script only. in addition we have JSLOG(), alerts etc. 

Check below links 

https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/new_to_servicenow/app_store_le...

https://www.oreilly.com/library/view/servicenow-application-development/9781787128712/b45c9b36-48a7-...

https://community.servicenow.com/community?id=community_question&sys_id=485a1f65db861090a08a1ea66896...

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Aiswarya Brigh1
Tera Contributor

Hi Rama,

 

console.log() is a javascript method used to add add log messages to the console of a browser. It can be used in Widget scripts etc.

How to check for the console logs

1. click -> Ctrl+Shift+I in chrome browser. This opens up the console and messages gets displayed as highlighted when the script runs

find_real_file.png