- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2023 11:31 PM
How to restrict assigning 2 sctasks to a same member when the tasks are generated from same ritm .
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2023 11:57 PM
Hi
You need a before Insert/update BR on the Catalog Task table which runs when
Assigned To | changes
(function executeRule(current, previous /*null when async*/ ) {
var ritmis = new GlideRecord('sc_task');
ritmis.addQuery('request_item', current.request_item);
ritmis.addQuery('assigned_to', current.assigned_to);
ritmis.query();
if (ritmis.next()) {
gs.addErrorMessage('Assigned user already has another task for the RITM. Please assign it to othe user');
current.setAbortAction(true);
}
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2023 11:57 PM
Hi
You need a before Insert/update BR on the Catalog Task table which runs when
Assigned To | changes
(function executeRule(current, previous /*null when async*/ ) {
var ritmis = new GlideRecord('sc_task');
ritmis.addQuery('request_item', current.request_item);
ritmis.addQuery('assigned_to', current.assigned_to);
ritmis.query();
if (ritmis.next()) {
gs.addErrorMessage('Assigned user already has another task for the RITM. Please assign it to othe user');
current.setAbortAction(true);
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 12:02 AM
Hi@nameisnani ,
Are you using flow designer are workflow
If you your using flow deginer. in flow you can set take from first task assigned to is same as second task the you can abort action when same by using the script in flow designer .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 12:21 AM
Hi @Jaspal Singh thanks for qr
While assigning it self it has to through an error . Please update how to do @Jaspal Singh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 12:33 AM
Hi @nameisnani , Comments as shared above should help take care.