- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2016 11:14 PM
Hello experts
I am facing a issue with a script include I am using in for a advanced reference qualifier. The customer I am working with is using the Service Desk Call application. If they the Call type is set to incident, they should be able to choose a service, a category and a subcategory. Currently I have a reference field (Category and Subcategory) that is doing a lookup on the sys_choice table. In the script include I have added a query to get all the relevante categories and returning them, but the reference field is not populated. Pictures to follow:
Script include:
Catefory reference specification:
Category field specification:
Can anyone assist me in finding my error? Do I have to return something else than the label?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2016 11:33 PM
Your script might be stopping when it hits the undefined 'current' on line 11. Try passing current as another argument when you call your function.
This is how I would define the Script Include. Then call it with javascript: new GSS_Call_Categories().getRefQual(current)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2016 11:20 PM
I think the reference qualifier should be like:
javascript:new myScriptInclude().my_function()
In your case it will be:
javascript:new GSS_Call_Categories().GSS_Call_Categories()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2016 11:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2016 11:34 PM
Ok, now could you please change your script include a little bit:
Replace the line function GSS_Call_Categories(internal_service_sys_id) with the following lines:
var GSS_Call_Categories = Class.create();
GSS_Call_Categories.prototype = {
initialize: function() {
},
GSS_Call_Categories:function(internal_service_sys_id) {
Put required } in the end.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2016 11:46 PM