- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2017 12:05 PM
I'm in the process of refactoring our CTI processing for Istanbul per HI KB0620953 "Ensure a working CTI Integration in preparation for an Istanbul upgrade". The big change is that any inserts, updates or deletes must be performed from a non-client callable script in sys_script (business rules table) while the rest of the CTI processing is in a client callable script in sys_script. The problem I'm having is that the client callable script is getting a 'function not found' error when calling the non-client callable script. Here's the client callable script:
function cti() {
var empNbr = sysparm_caller_id;
var url = 'nav_to.do?uri=new_call.do';
if (empNbr != null && empNbr != '') {
var user = new GlideRecord('sys_user');
user.addQuery('employee_number', empNbr);
user.query();
if (user.next()) {
// it's this statement that fails with function not found
var callSysId = u_CTI_Create_Call(user.sys_id, user.employee_number, user.u_lan_id); // not client-callable per release notes
if (callSysId != null) {
url += '?sys_id=' + callSysId; // set url to open the just created call record
}
}
}
answer = url; return url;
}
The u_CTI_Create_Call is defined as a non-client callable business service on the Global table and is active.
What am I doing wrong?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2017 03:32 PM
I had opened up a HI incident on this issue and just heard back that KB0620953 as well as the comments in the OOTB CTI Processing business rule are in error - the non-client callable function that must be factored out should be a script include and not a global buisness rule (sys_script entry).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 10:37 AM
Confirm that your script include is not client callable and change 'Accessible from' to all application scopes. I have it working on our environment, so for sure it works. We are able to create an incident, write to the log, and do gs.addInfoMessage.
Thank you again to Arren for getting us going in the right direction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 11:04 AM
Thanks you Arren and Gregg! I changed the script include to be callable from all application scopes and now it's working as expected.