How to 'reference' a Service Portal Catalog Item vs. the same CMS Catalog Item.

Wesley Breshear
Tera Expert

Hello,

Still a beginner at JavaScript and have no clue how to modify the script below.   This is an out-of-the-box script (I believe) on the ServiceNow New Call module.   When the Service Desk selects "Request" as the Call Type and then selects the appropriate Request Item.   They then can use the Submit Call button which executes the script below and they are redirected to the Request Item on the CMS side of ServiceNow.   I would like to have the referenced catalog item direct the Service Desk agent to the Service Portal vs. CMS UI.   Could you please assist how this could be coded?

// Submit button for New Call

answer = current.insert();

gs.include('ActionUtils');

var au = new ActionUtils();

au.postInsert(current);

// After New Call is created take agent to Incident record.

if (current.call_type == 'status_call'){

gs.setRedirect("incident.do?sys_id=" + current.transferred_to);

}

Service Portal Cat Item.jpg

Thank you,

-Wesley