- 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
‎07-24-2017 06:48 AM
It was initially set as 'This application scope only' but I've changed it to 'All Application scopes' for testing.
Now I've switched it back to 'This application scope only' and tried it again but still no use.
The strange thing is even though I've removed the code where it redirects to 'incident.do' form but still somehow it always points to a new incident record form as below:
'incident.do?sys_id=-1&sysparm_view=itil&sysparm_query=m_id=<xxxxx>
Not sure if there is any other script that needs to be modified?
Regards,
Santhosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 07:05 AM
It defaults to creating a new incident if there are any errors with the cti processing. There are no other scripts that need to be modified other than the BR and the script include.
Your BR looks fine. After changing it back to "This application scope only" were there any changes to your error message?
If the error message has changed or even disappeared, you may be running into some issues with the script code itself.
What is the rest of the url for your screenpop after https://yourinstancename.service-now.com/
Is it something like cti.do?sysparm_cti_rule=cti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 07:13 AM
Still get the same error:
WARNING *** WARNING *** CTIProcessor: No client-callable function found in rhino.sandbox with name 'cti'. Make sure the containing sys_script entry is marked client-callable.
url is: http://<instance>.com/cti.do?pccstraim_id=<number>
Thanks and Regards,
Santhosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 07:23 AM
In that case, I'd try explicitly naming the cti_rule
https://<instance>.com/cti.do?sysparm_cti_rule=cti&pccstraim_id=<number>
If that doesn't work, try renaming your function in your BR from function cti() to function cti_new() and see if you still get the same error message.
and use https://<instance>.com/cti.do?sysparm_cti_rule=cti_new&pccstraim_id=<number>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2017 07:28 AM
Hello Arren,
I tried using the cti_new in both the BR and also in the URL and still get same error:
2017-07-24 16:26:43 (571) Default-thread-9 1A4A7513B1000300FB9826CAD869320D #1246 /cti.do Parameters -------------------------
pccstraim_id=P280847
sysparm_cti_rule=cti_new
2017-07-24 16:26:43 (571) Default-thread-9 1A4A7513B1000300FB9826CAD869320D WARNING *** WARNING *** CTIProcessor: No client-callable function found in rhino.sandbox with name 'cti_new'. Make sure the containing sys_script entry is marked client-callable.
I want to try another approach by disabling the current BR and create a new global BR and see if that helps.
Will let you know the outcome.
Regards,
Santhosh