The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Background script debugging

lauri457
Tera Contributor

How to enable the script execution history in scripts - background to print stuff like the sql statements from the execution? Or have I just dreamed that this functionality exists? 

e.g.

var query = new GlideRecord('incident')
query.query()

 would print something like this, maybe even more details like command counts etc.

[SELECT ... FROM ... WHERE ...]

 

3 REPLIES 3

Bhuvan
Kilo Patron

@lauri457 

 

Check if you are looking for below information,

 

https://www.servicenow.com/community/in-other-news/background-scripts-enhanced-and-hidden-features-a...

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

Juhi Poddar
Kilo Patron

Hello @lauri457 

This is not possible in background script. 

Hope this helps!

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You

Juhi Poddar

Ankur Bawiskar
Tera Patron
Tera Patron

@lauri457 

No you cannot.

To check what sql statements were executed you can try to check in transactions table

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader