When a form is submitted, the Incident Caller is submitted as Guest Automatically

Malik Wheeler
Tera Contributor

We have a form setup for users to submit a question that they may have. When the form is filled out, it submits an incident using the fields for caller, email, phone, and details of the questions. Once a user submits this form, on the service management side of Servicenow, users will see the incident submitted as a guest and not the caller which is automatically filled in the form. Below I have include the script that is used within the form. Any assistance that can be provided is helpful.

Thanks!

 

var caller = gs.getUserID();

current.contact_type = 'self-service';
current.caller_id = caller;
if (producer.comments.length > 80)
current.short_description = producer.description.substring(0, 79);
else
current.short_description = producer.description;
current.description = producer.description;
current.u_contact_name = producer.name;
current.u_contact_email = producer.email;
current.u_contact_phone = producer.phone_number;
current.watch_list = producer.email;
 
var incRPUtil = new LinkRecordProducerToIncident();
incRPUtil.linkRecordProducerToParentIncident(RP.getParameterValue('sysparm_parent_sys_id'), current);
 
gs.addInfoMessage('Thank you for submitting you question.');
producer.portal_redirect = '?id=main';
1 REPLY 1

ritu_saluja
Tera Expert