- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2024 01:21 AM
i use below scrip in workflow catalog task activity but i got error : Fault Description: org.mozilla.javascript.WrappedException: Wrapped Conversion Error: The undefined value has no properties
please help me this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2024 01:26 AM
Hello @poco ,
Give a try to the script below and see how it works for you.
// Make sure 'task' object is defined
if (task) {
// Update short description
task.short_description = 'ABC | Add ' + ' ' + current.variables.requested_for.getDisplayValue() + ' ABCDE';
// Update description
task.description = 'Add the user to the abcd group';
// Update assignment group
task.assignment_group = 'abcde group';
// Log information
gs.log('Task properties updated successfully.');
} else {
// Log an error if 'task' is undefined
gs.log('Error: Task object is undefined.');
}
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Aniket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2024 01:29 AM
Hi @poco
There is an issue with below line
task.short_description = 'ABC | Add ' + ' ' + current.variables.requested_for.getDisplayValue() ABCDE';
try to adjust it with
task.short_description = 'ABC | Add ' + ' ' + current.variables.requested_for.getDisplayValue() +' ABCDE';
There is no '+' in between try to use that.
If it helps, please mark Helpful
Thanks,
Mounish.CH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2024 01:30 AM
short description is wrong,
Try
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2024 01:26 AM
Hello @poco ,
Give a try to the script below and see how it works for you.
// Make sure 'task' object is defined
if (task) {
// Update short description
task.short_description = 'ABC | Add ' + ' ' + current.variables.requested_for.getDisplayValue() + ' ABCDE';
// Update description
task.description = 'Add the user to the abcd group';
// Update assignment group
task.assignment_group = 'abcde group';
// Log information
gs.log('Task properties updated successfully.');
} else {
// Log an error if 'task' is undefined
gs.log('Error: Task object is undefined.');
}
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Aniket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2024 01:29 AM
Hi @poco
There is an issue with below line
task.short_description = 'ABC | Add ' + ' ' + current.variables.requested_for.getDisplayValue() ABCDE';
try to adjust it with
task.short_description = 'ABC | Add ' + ' ' + current.variables.requested_for.getDisplayValue() +' ABCDE';
There is no '+' in between try to use that.
If it helps, please mark Helpful
Thanks,
Mounish.CH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2024 01:30 AM
short description is wrong,
Try
Regards,
Piyush Sain