Error when creating an incident from case on workspace: Illegal access to outbound HTTP

JordyZ
Mega Sage

Hi,

 

I have a custom workspace UI action that creates an incident from a case (it opens an unsaved incident record with some prepopulated fields. 

 

UI action script:

 

// Create a new incident record
var newRecord = new GlideRecord("incident");
newRecord.initialize();

newRecord.setValue("caller_id", gs.getUserID());
newRecord.setValue("short_description", current.getValue("short_description"));
newRecord.setValue("description", current.getValue("description"));
newRecord.setValue("parent", current.getValue("sys_id")); 

// Retrieve the current user's department from cmn_department
var userRecord = new GlideRecord('sys_user');
if (userRecord.get(gs.getUserID())) {
    var department = userRecord.getValue('department'); 
    if (department) {
        newRecord.setValue("u_agency_department", department);
    }
}


// Open the new record
action.openGlideRecord(newRecord);

 

When I save the unsaved record, I get this error message: Illegal access to outbound HTTP in CTI-Connector-ServiceNow. Use an async business rule to perform outbound HTTP requests.

JordyZ_0-1727443656779.png

I don't know what that means, when am I performing an outbound HTTP request with my UI action?

Any help is appreciated!



1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@JordyZ It looks like an API call is made the moment you save an incident record on your instance. This API call is being made from CTI-Connector-ServiceNow app. This app might be making a synchronous API call due to which this error is popping up on the screen. If this is an app from ServiceNow, you can raise a case with ServiceNow support team to get it addressed.

 

Please refer to thread https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0753657 for more information.

 

An ideal solution is to replace synchronous API call with asynchronous.

View solution in original post

5 REPLIES 5

Thanks for the upvote and accepted solution. I will share my inputs on the other thread too.