ServiceNow Function to Convert Incident to Service Request

function createRequest(incident) { var sc_req = new GlideRecord (“sc_request”); sc_req.initialize(); sc_req.u_requested_by = current.u_contact_person; sc_req.u_requested_by_phone = current.u_contact_phone; sc_req.location = current.location; sc_req.requested_for = current.caller_id; sc_req.phone = current.u_customer_phone; sc_req.u_computer_name = current.u_computer_name; sc_req.short_description = current.short_description; sc_req.description = current.description; sc_req.contact_type = current.contact_type; sc_req.assignment_group = current.assignment_group; sc_req.u_business_service = current.u_business_service; sc_req.category = current.category; sc_req.subcategory = current.subcategory; sc_req.cmdb_ci = current.cmdb_ci; sc_req.assigned_to = current.assigned_to; […]