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
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