Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Find the table name of Table sys id in attachments - Before catalog item submission

Anish Reghu
Kilo Sage

Dear experts,

find_real_file.png

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

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Anish Reghu 

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

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

View solution in original post

17 REPLIES 17

Ankur Bawiskar
Tera Patron
Tera Patron

@Anish Reghu 

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

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

cmcdowellaus
Tera Contributor

I recently had this same requirement and i was able to obtain the value from the angular element.

 

The attachment object is found at: window.angular.element('#sc_cat_item').scope().$parent.attachmentHandler

 

I was able to get the following values in a client script using the following paths:

 

var tableName = window.angular.element('#sc_cat_item').scope().$parent.attachmentHandler.tableName;

var tableId = window.angular.element('#sc_cat_item').scope().$parent.attachmentHandler.tableId;

 

Hope this helps someone.

 

Regards

Chris

 

aniruddhnow
Tera Contributor

Hi @Anish Reghu ,

 

Go to the Global Search and search for this sys_id so you will get the record.

Open that record and in the URL bar, you will find the table name.

Thanks,

Aniruddha Dhandar