
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 02:04 AM
Dear experts,
The Table sys id highlighted in the pic above, how do I find the table name of that sys_id?
It is not sc_cat_item nor is it, sc_cart_item.
This is the attachment entry created before submission of the catalog item.
Regards,
Anish
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 03:03 AM
It seems you are adding file to some record producer or catalog item during submission
The sysId you are seeing is not any record of some table
It's a temporary GUID which ServiceNow generates and links it to sc_cart_item table during catalog form submission
More detailed discussion here
Is there a way to get the cart item id in portal
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 04:09 AM
Yes Indeed, Its a brilliant feature.
Regards
Sulabh Garg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 02:20 AM
Hi Anish,
You can use the below script which will help you...
var gr = new GlideRecord('sys_db_object');
gr.addQuery('sys_id','YOURSYSID HERE');
gr.query();
while(gr.next())
{
gs.addInfoMessage(gr.name); //This will give you table name
}
Thanks,
Sohail Khilji
Kindly Mark Correct / Helpful if it address your concern...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 02:22 AM
Hi Sohail,
Thanks, but this just scans the sys_id of the tables in ServiceNow.
What I need is - that input be any table record without specifying table name and system returns me the table name.
Regards,
Anish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 02:47 AM
On this page, you’ll find a few of the scripts I’ve saved over the years, and maybe a few scripts submitted by our most clever and dashing readers. The scripts you’ll find here, are one-off blocks of code that solve one problem as efficiently as they can. You won’t find detailed deep-dive explanations here, like you would in my articles on the blog; just examples, prototypes, and quick fixes to common coding conundrums. You also won’t find any of the scripts that I’ve already written articles with detailed explanations on, such as the Journal Redactor.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 02:49 AM
Thanks for commenting. But, I don't find any hyperlinks in your comment.