- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 04:20 AM
Is there a way to select tasks assigned to me and post a question to the requestor?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 06:43 AM
Then you can use the template bar for the same.
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 06:28 AM
HI @tmccasland ,
I trust you are doing great.
You can create a BR for the same
Script :
(function executeRule(current, previous /*null when async*/) {
// Check if the task is assigned to the current user
if (current.assigned_to == gs.getUserID()) {
// Get the requestor's user record
var user = new GlideRecord('sys_user');
if (user.get(current.requested_by)) {
// Post a question to the requestor
var workNote = "Hello " + user.name + ", I have a question regarding this task. Can you please provide more details?";
current.work_notes = workNote;
current.update();
}
}
})(current, previous);
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 06:39 AM
HI Amit, thanks for the info, but I am limited to using the ServiceNow UI and don't believe I have access to create scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 06:43 AM
Then you can use the template bar for the same.
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 07:03 AM - edited ‎10-04-2023 07:05 AM