How to get the Task ID and status by passing Request number or RITM number
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2025 04:07 PM
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2025 11:27 PM
Hi Arjun,
Be it task or sc_task table using parent field on both the table you can get the task and its status.
You need to glide the respective table using, ritm sysid you can query on that table.
Assuming you will use script to get the task status, below is the code -
var task = new GlideRecord('task');// Glide on Task Table
task.addEncodedQuery('parent=aec79906eb43011008f2951ff15228f0'); //here pass the ritm sys id
task.query();
while(task.next()){ // you will get all the task related to specified ritm above
gs.info('Task Number - '+task.number+ ' Task Status - '+task.state); // print the task number and its status.
}
Please mark as helpful if this answers your question, or let me know if any help needed further.
Thanks,
Chinmay T
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2025 12:05 AM
what's your actual business requirement?
are you planning to write script for this? if yes then where?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader