Script for create a new task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 06:45 AM
Hi everybody ! I need to create a new task from another task. So I've used a BR, but I think something is wrong with my script, somebody could help me and tell me how to correct it? Thanks.
The script in the BR (I set condition when to run with update and insert and when the state changes to 'waiting for delivery'):
(function executeRule(current, previous /*null when async*/) {
var task = new eyRmaNcUtils();
task.assignment_group = '445334299780e1981fadb6e3f153aff2'; //change assignment group in the new one
task.current.state = 160; //set the state of the new task
current.update();
action.setRedirectURL(current);
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2023 03:28 AM
Hi @Alessia Russo ,
If you trying on UI action to create task refer below link.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar