HarshTimes
Tera Guru

Some Servicenow tips, tricks and interesting information


1. <table_name>.config / <table_name>.CONFIG
- Check the configuration settings of a table like business rules, client scripts, ACLs, Notifications etc..
- For example: you want to see the configuration of a incident record, then type incident.config in the application navigator search. This will display all the configuration related to the incident record. Type '.CONFIG'(in upper case) instead of '.config' to open the configurations in a new window.

2. <table_name>.do / <table_name>.DO / incident.form / incident. FORM
- This shortcut key will open a new form of selected table. Lets say table is incident.In the application navigator type incident.do. A new incident form will open.
- <table_name>.form do the same things but this shortcut key does not work in UI15.
- If you want to open the new form in a new window then use the shortcut keys in CAPS. Lets say you want to open a new incident form in a separate window,Type incident.DO or incident.FORM in the application navigator search.

3. <table_name>.list /<table_name>.LIST
- This shortcut key will display the list of records of selected table. Lets say table is incident.In the application navigator search type incident.list. A list of incident record will be displayed.
- If you want to display the list of records in a new window then use the shortcut keys in CAPS. Lets say you want to open a new incident form in a separate window. Type incident.LIST in the application navigator search.

4. stats.do
- In the application navigator type stats.do . This will provide the information about your servicenow instance.
- Name of your instance
- Cluster node to which you are connected to
- Version of your instance
- total active sessions
- a lot other interesting information...

5. cache.do
- flush cache.
Scenario - You captured some UI changes on your update set and after committing your update set, you are not seeing the new changes in your instance. You are still seeing the old ones. Then you can flush the cache. Cache stores all the recent UI layouts for better performance.
Note: Ensure that a cache flush is not being run during business hours. Cache flushes are intended to prevent older data from interfering with changes and updates, and are performed automatically when using update sets. Scheduled cache flushes, using cache.do, can affect overall performance, and degrade system response times. Do not run cache flushes during business hours, and do not trigger cache flushes automatically.

6. Javascript Executer
- This helps to debug any client side issues.
- Open any form and Press Alt+Ctrl+shft+j.There will be a javascript executer popup. You can write script here to test the client side functionality.
- Detailed information on link https://community.servicenow.com/community?id=community_blog&sys_id=5f2de6e5dbd0dbc01dcaf3231f961936
7. xmlstats.do
- type xmlstats.do in the application navigator search menu.
- Monitor the status of components and processes of Operational Intelligence.
- Use the XMLStats page to view statistics and diagnostic details that can help with troubleshooting issues with Operational Intelligence.

8. Syntax editor macros
- Script macros provide shortcuts for typing commonly used code. To insert macro text into a script field, enter the macro keyword followed by the Tab
- Create a syntax editor macro with below details(below example is out of box)
Name : vargr
comments: Inserts a standard GlideRecord query for a single value.
text:
var gr = new GlideRecord("");
gr.addQuery("name", "value");
gr.query();
if (gr.next()) {
}

Now, open any script(client script or business rule or script include etc). type the keyword vargr in the script editor and then press tab. You will find that all the details in related syntax editor text is populated .
- There are few out of box and you can also setup your own script shortcuts.
- You can find more details in the doc link - https://docs.servicenow.com/bundle/madrid-application-development/page/script/general-scripting/conc...

 

9. help in script editor
- Write help in script editor and then press tab button. All the existing syntax editors will be populated with name and description. It is not a easy task to remember all the script syntax editor shortcuts. As this shortcut displays all the existing ones,It will be easier for the developers to know what is available already that he/she can use. 

 

Credit to all community members. All the information gathered from multiple community posts, servicenow docs and personal experience. Hope you will like that.

 

-Harsh

 

Comments
Khanna Ji
Tera Guru

Nothing new, everybody knows these things 😞

HarshTimes
Tera Guru

Thanks. This may be helpful for  new developers.

 

Khanna Ji
Tera Guru

you are right... I will remove my comments...

Version history
Last update:
‎02-27-2019 06:25 PM
Updated by: