How to get sys_id for record after g_form.submit()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 02:38 AM
The sc_cat_item page on service portals allow users to submit a catalog item.
I am going through the code on the widget and it seems like the submit button calls g_form.submit() to produce the record.
How can I get the sys_id of the record if g_form.submit() is successful? I need to retrieve it in the same widget, preferably in the same function that calls g_form.submit().

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 02:44 AM
Hi,
Are you using a normal Client Script or Client Controller script from widget? g_form is not accessible from Widget unless you created any local variable.
In normal client script, the form will be submitted after this command, so even if you capture, the page would go to next page
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 02:49 AM
Look into the code of the widget on the sc_cat_item page. It uses g_form.