- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 02:51 PM
I want to validate that a user has attached a quote (e.g. uploaded .docx) to a catalog item before they submit the item to their cart. To do this I want to check the sys_attachment table for any attachments. When a user uploads the attachment, but before they add the item to their cart, SNow puts a record in sys_attachment with:
Table name = sc_cart_item
Table sys ID = <GUID of sc_cart_item instance>
The issue is SNow has not committed the sc_cart_item to the table until the user adds it to their cart so I can't get the sys_id of the sc_cart_item to check the sys_attachment table. But obviously the session has the GUID since it inserted the GUID to the sys_attachment table. Anyone know how to get a reference to the sc_cart_item GUID before the user submits the item to their cart?
Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 03:01 PM
Try g_form.getParameter("sysparm_item_guid") in client script
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2019 10:55 AM
Yep, we ran into this too.
Here is the workaround we came up with:
https://community.servicenow.com/community?id=community_question&sys_id=46318be5db98dbc01dcaf3231f9619bf