How to create interaction ID from incident record

B Y1
Tera Contributor

Hello, 

 

Would like to add "Walk-up appointment booking" from the incident record page, need to implement this in the Platform native UI. 

BY1_0-1720461039167.png

Thanks

1 REPLY 1

Namrata Ghorpad
Mega Sage
Mega Sage

Hi @B Y1 ,

 

On incident form configure UI Action and create new UI action with name "Create Interaction" and select Form Context Menu as true. write below script in script section.

createInteraction();

function createInteraction() {
   var inter = new GlideRecord("interaction");
   inter.short_description = current.short_description;
   inter.type = current.contact_type;
   inter.opened_for=current.caller_id;
   inter.assigned_to=current.assigned_to;
  inter.parent=current.sys_id;
   var sysID = inter.insert();
   gs.addInfoMessage("Interaction record is created");
   action.setRedirectURL(sysID);
   
}

 

Please mark my answer as correct and helpful if it helps you.

Regards,

Namrata