Adding sys_id to a report, the easy way

Hi All, long time no post. Figured I’d ease back into this whole blogging thing with an easy post, to start to get the gears turning again!

Little known fact, is that you can actually export in a list the sys_id field, and even add it to a report. The quick and dirty way to do this, is to just export the XML of the sys_report record, update the field_list field and then import back the XML.

There might be a number of different reasons why you want the sys_id in a report, so you can easily match back up to the unique identifier in ServiceNow for the record. It could even be used to reverse craft the URL as well.

Here is an even easier direct user friendly way to add this capability on all List view reports using a UI action. First users need to navigate to the sys_report table and identify their report, then they can just click this simple UI action!

The UI action has two simple lines of code:

current.field_list += ",sys_id";
current.update();

Download and try this UI action in your instance!
AddSysIDToReport sys_remote_update_set_cd2f7e39c3a30210d419de1d050131ab.xml