- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 02:34 AM
Hi All,
in my workflow there is an advanced script to do a few checks, but it keeps giving me an error.
can someone point me in the right direction were to look ?
org.mozilla.javascript.WrappedException: Wrapped ConversionError: The undefined value has no properties. (// Set values for the task in this script. Use the variable 'task' when setting additional values.
// Note: This script is run after the task values are set using the Fields, Template or Values you have specified.
//
// For example:
// task.short_description = current.short_description;
//task.short_description = "New Keyboard request fulfillment";
var supportloc = ifScript();
function ifScript() {
var usr = current.variables.requested_for.toString();
var usrloc = new WorkflowUtils().getUsersHomeOffice(usr);
var zug = gs.getProperty("LKQ_Zug_Office");
if (usrloc == zug) {
return 'zug';
}
return 'isc';
}
task.description = "Create cloud only email account, enable MFA & configure groups for new employee";
var temp = current.cat_item.name;
if(temp == 'LKQ EU Onboarding Request (HR)'){
task.short_description = "Configure account for new employee";
task.assignment_group = new WorkflowUtils().getTaskAssignmentGroupByTaskID(workflow.name,'newemployeeISC_task');
}
; line 9) (sys_script_include.365eca63c0a8016600069528aee5affb.script; line 117)
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 02:36 AM
Hi,
so these lines are written where?
task.description = "Create cloud only email account, enable MFA & configure groups for new employee";
var temp = current.cat_item.name;
if(temp == 'LKQ EU Onboarding Request (HR)'){
task.short_description = "Configure account for new employee";
task.assignment_group = new WorkflowUtils().getTaskAssignmentGroupByTaskID(workflow.name,'newemployeeISC_task');
}
Also the error says error at line 117 in script include. Did you check that?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 02:36 AM
Hi,
so these lines are written where?
task.description = "Create cloud only email account, enable MFA & configure groups for new employee";
var temp = current.cat_item.name;
if(temp == 'LKQ EU Onboarding Request (HR)'){
task.short_description = "Configure account for new employee";
task.assignment_group = new WorkflowUtils().getTaskAssignmentGroupByTaskID(workflow.name,'newemployeeISC_task');
}
Also the error says error at line 117 in script include. Did you check that?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 02:39 AM
oh i missed that part about the script include, the issue could be there then..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 02:40 AM
yes also check what are you sending in this variable -> workflow.name
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2022 08:55 PM
Hi Ankur,
kindly help me with the below link
Thank you in advance