- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 02:01 PM
Good Evening,
I have a requirement to put the updated date into a task variable when all the approvals of a request are all approved and the task is created.
I need to take the updated date from the RITM and put in the Approved date field on the task.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 11:50 PM
Hello @Darlene York,
try to create After Update business rule for this on sc_req_item table,
condition = current.approval == 'approved'
// Check if all approvals are approved
if (current.approval == 'approved') {
// Query associated tasks (e.g., Catalog Tasks)
var taskGR = new GlideRecord('sc_task');
taskGR.addQuery('request_item', current.sys_id);
taskGR.query();
while (taskGR.next()) {
// Assuming 'approved_date' is a variable or field on the task
// Use the RITM's updated date (last update timestamp)
taskGR.approved_date = current.sys_updated_on;
taskGR.update();
}
}
Mark Helpful if you issue got resolved,
Regards,
Rohan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 11:50 PM
Hello @Darlene York,
try to create After Update business rule for this on sc_req_item table,
condition = current.approval == 'approved'
// Check if all approvals are approved
if (current.approval == 'approved') {
// Query associated tasks (e.g., Catalog Tasks)
var taskGR = new GlideRecord('sc_task');
taskGR.addQuery('request_item', current.sys_id);
taskGR.query();
while (taskGR.next()) {
// Assuming 'approved_date' is a variable or field on the task
// Use the RITM's updated date (last update timestamp)
taskGR.approved_date = current.sys_updated_on;
taskGR.update();
}
}
Mark Helpful if you issue got resolved,
Regards,
Rohan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 07:40 AM
Rohan,
Thank you very much!