Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Create new record with UI action

Kush Sharma
Tera Guru

Guys - I wanted to create custom table  record from incident form via UI action and same should be visible in related list as well for that incident record.

custom table name - u_interaction_record

Pls help

1 REPLY 1

Mohith Devatte
Tera Sage

hello @Kush Sharma ,

you can do like this 

replace gr.parent with the field with the field which stores the incident on u_interaction form .

Write this code in UI action on incident form

var gr = new GlideRecord('u_interaction_record');
gr.initialize();
gr.parent=current.sys_id;
gr.insert();

Hope this helps 

Mark the answer correct if this helps you