My good friend James Neale has just published a new tool for exploring Java and JavaScript objects in ServiceNow. This tool is incredibly useful and should be part of all ServiceNow developers set of tools. He is releasing it free of charge on Share.
Download it here
In his own words:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | Use Xplore to investigate objects, both Java** and JavaScript, in ServiceNow as a script function and as a fully functional and interactive UI. UI: - Single page for writing, debugging, and running scripts, and exploring objects. - A better-than background script replacement.* - Automatically prints out the contents of any object, including Java based objects**. - Uses a simple CodeMirror interface for improved scripting and syntax highlighting, handling thousands of lines of code easily. - Interactive type filters allow you to quickly show and hide specific types of properties on the object. - Breadcrumbs allow you to see exactly where you are when exploring an object. - Use interactive property names to dive into an object without typing anything. You can even call functions with a click (no parameters). - Automatic capture of log statements in your script, such as gs.print, gs.log, gs.addInfoMessage, etc. - Failed script recovery for when ServiceNow kills a transaction. - Works in the client as well; launching from the ServiceNow UI gives access to ServiceNow webpage instead of using console. - Client side jslog() calls are also captured (when in client mode). Script: - The heart of Xplore is the snd_xplore Script Include which provides a function for looking into any object in ServiceNow. - Simply run snd_xplore(myObj) in a script or background script to have it automatically print the contents of the object to the print log. - Auto-adjusts to using gs.debug if you are in a scoped app. e.g. snd_xplore(gs.getUser()) - Provide your own reporter for capturing output. Xplore has been built on Fuji Patch 7. It should work on previous versions of ServiceNow, but you may have to adjust the Xplore application module as it's designed to work with the UI15 navbar. Please rate! Suggestions and bug reports welcomed. * Currently not able to choose what scope to run a script in. ** Some Java stuff will not show up either due to protection policy or scriptable design. |
Looking forward to trying this out, very handy! Thank you for sharing.
I would like to use this tool while impersonating other users. Is this strictly tied to users who have the admin role?
Hey Alex
At the moment this isn’t possible though it is on the feature list to implement.
Thanks,
James
Impersonation is now supported in Xplore 3.5.
Xplore will run even when you are impersonating.
Cheers
James
I have yet to try this tool out, but are there any plans for Helsinki?
Thanks,
James
Here’s the updated location in case anyone else was looking for this in today’s structure: https://developer.servicenow.com/connect.do#!/share/contents/9650888_xplore_developer_toolkit?v=4.7&t=PRODUCT_DETAILS