Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2020 08:25 AM
Hi,
On the Service portal once user clicks the button i am getting all the details from the html using input method and i am able to create a record with below script
var gr = new GlideRecord('u_qa');
gr.initialize();
gr.question = input.u_questions;
gr.name = input.name;
gr.insert();
this goes and create a record u_qa table but i want the sys id of the created of record as a response. can anyone please help me how to do that ?
Solved! Go to Solution.
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2020 08:26 AM
use below
var gr = new GlideRecord('u_qa');
gr.initialize();
gr.question = input.u_questions;
gr.name = input.name;
var s = gr.insert();
gs.info(s);
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2025 01:00 PM
Mine doesn't work. I do it in Script Include. it returns null.
Is there anyone have any other solutions?