- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2024 01:57 PM
Hi
Can you please assist with extracting the assignment group from a catalog item to set it as the assignment group for an SCTask?
Once a user selects the assignment group, this information should be captured from the RITM and assigned to the SCTask assignment group.
The General Service Request is an SCTask selected from the Select Request Template.
The Assignment Group is a reference field that obtains its information from the sys_user_group table and is named
assignment_group.
SCtask assignment group
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 10:01 PM
Hi @Sid2024
Let me know if you face any difficulties.
Please mark the solution as correct if it works for you.
Thanks!
Ramkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 01:33 AM
Hi @Sid2024 ,
You can write a before Business Rule on Catalog Task (sc_task) table.
Advanced: true
When to run:
before (insert)
Conditions: add if any
Advanced script:
(function executeRule(current, previous /*null when async*/) {
current.assignment_group = current.request_item.assignment_group;
})(current, previous);
Hope it works 😊.
Mark the response correct and helpful if the answer assisted your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 10:42 PM
Hi @Sid2024,
Write after BR on sc_req_item table.
Table: sc_req_item
Advanced : true
When to Run
after (insert/update) - as required for the requirement
Condition: Assignment group changes
Advanced Script:
var grSCTASK = new GlideRecord('sc_task');
grSCTASK.addQuery('request_item.sys_id', current.sys_id);
grSCTASK.query();
if(grSCTASK.next()){ //use while if there are more than 1 sctasks
grSCTASK.assignment_group = current.assignment_group;
grSCTASK.update();
}
Mark the response correct and helpful if the answer assisted your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 01:29 AM
I need the assignment group to be auto populated on catalog task while creating, from request item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 01:33 AM
Hi @Sid2024 ,
You can write a before Business Rule on Catalog Task (sc_task) table.
Advanced: true
When to run:
before (insert)
Conditions: add if any
Advanced script:
(function executeRule(current, previous /*null when async*/) {
current.assignment_group = current.request_item.assignment_group;
})(current, previous);
Hope it works 😊.
Mark the response correct and helpful if the answer assisted your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 01:43 AM
Hi Rupan,
It is now working correctly.
Thank you so much for your help.