- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2023 06:21 PM
Can anyone help me in getting this as I need to auto populate Assigned to field in Change Request based on SCTASK Assigned to Field. In Change request Assignment Group is getting populated via workflow but Assigned to field should get populate based on SCTASK Assigned to field selection. @Ankur Bawiskar @Vasantharajan N
SCTASK Assigned to:
Change Request Assigned to:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2023 11:50 PM
@Arjun Reddy Yer - Please use the below code in your BR on sc_task table and check.
var ritm_sysId = current.request_item.toString();
var chGr = new GlideRecord('change_request');
chGr.addQuery('parent', ritm_sysId); // As you are setting Parent field on change request to RITM sys_id, As per the create task script you shared.
chGr.addActiveQuery(); // only use active change ticket. Please apply filters if rquired on state.
chGr.query();
if (chGr.next()) {
chGr.assigned_to = current.assigned_to.toString(); // Update the curret SC_TASK assigned to Change Assigned to
chGr.update();
}
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2023 11:50 PM
@Arjun Reddy Yer - Please use the below code in your BR on sc_task table and check.
var ritm_sysId = current.request_item.toString();
var chGr = new GlideRecord('change_request');
chGr.addQuery('parent', ritm_sysId); // As you are setting Parent field on change request to RITM sys_id, As per the create task script you shared.
chGr.addActiveQuery(); // only use active change ticket. Please apply filters if rquired on state.
chGr.query();
if (chGr.next()) {
chGr.assigned_to = current.assigned_to.toString(); // Update the curret SC_TASK assigned to Change Assigned to
chGr.update();
}
Thanks & Regards,
Vasanth