- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2022 08:53 PM
we have the OOB workflow that creates two change tasks when state of change is set to implement.
When the "change" state moves from implement to review or close state, the change task should be assigned to the person who created the change request (requester) and another change task should be assigned to user (say Person A). How to achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2022 09:48 PM
Hi,
You can write before update business rule where you can mention the condition as State changes to Review or State changes to Closed Complete.
In the script you can write below code:
var taskGR = new GlideRecord('change_task');
taskGR.addQuery('change_request',current.sys_id);
taskGR.query();
if(taskGR.next()){
taskGR.assigned_to= <user A>;
taskGR.update();
}
current.assigned_to = current.requested_by;
Please mark correct if helpful.
Regards,
Vaibhav Dane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2022 11:04 PM
Hi
That worked!
Could you please tell me the difference between these two (after and before BRs), I have only read them theoretically but couldn't spot the difference while implementing.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2022 11:13 PM
Generally when you are updating some other table from based on conditions on current table then you have to go for 'After' business rule but when you are updating on current table then you have to for 'Before' Business rule.
Example : When Incident is closed then update something on Problem record - Write After BR
When Incident is closed then update something on Incident record - Write Before BR.
Best Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2022 11:21 PM
Thank you!