- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2023 07:18 AM
I have a requirement to create change task after submitting catalog item on SP.
so before creating change task, created change request by using create task activity.
Immediately after that used another create task and created change task.
By creating task in this way, change tasks are not coming under the change request .
So created after BR on change request table based on short description.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2023 12:54 AM
Hi @sravya03 Please find the below Business rule condition to create 3 Change task under Change after change creation.
(function executeRule(current, previous /*null when async*/) {
createChangeTask(current, current.assignment_group, 'Description for Task 1');
createChangeTask(current, current.assignment_group, 'Description for Task 2');
createChangeTask(current, current.assignment_group, 'Description for Task 3');
})(current, previous);
function createChangeTask(change, assignmentGroup, description) {
var gr = new GlideRecord("change_task");
gr.initialize();
gr.assignment_group = assignmentGroup;
gr.state = '1';
gr.description = description;
gr.change_request = current.sys_id;
gr.insert();
}
Cheers, hope that helps
Eswar Chappa
*** Please mark as "Correct" or "Helpful" as appropriate ***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2023 07:19 AM - edited ‎08-22-2023 07:20 AM
Hi @sravya03 the relation between RITM and Change is "Parent" as shown below, Then you need to update the Parent field value of change request with the current RITM sys id in Workfllow task,It will show
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2023 07:27 AM - edited ‎08-22-2023 07:40 AM
thanks @Eswar Chappa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2023 07:48 AM
for above code can we add wait for completion and if yes ,can you tell how?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2023 07:30 AM
task.u_parent_requested_item =current.sys_id;
Can i write above line in cretae task script