Creating a related list where the Task parent is the same as the Request Item parent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 12:34 PM
Hello All,
I would like to create a new related list on the Requested Item table where it contains a list of tasks whose parent is the same as the Request Item parent. For example, we have a Request Item whose parent is REQ000001, I would like to see the related list of tasks whose parent is also REQ000001 on the request item table. We have some flows where a catalog task appears on the REQ and not the RITM and it is confusing some users.
Let me know if you have any additional questions or clarifications.
Screenshot of current Related List:
Thanks for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 02:44 PM - edited 01-22-2025 02:44 PM
You can try with looking at the parent field on the sc_task which matches the parent from the RITM (parent.parent)
// here current = sc_task, parent = sc_req_item, parent.parent = sc_request (parent of your RITM)
current.addQuery("parent", parent.parent.sys_id);
Your code doesn't work as you're trying to query the sc_task field from the sc_req_item table (which doesn't exist). you're also trying to compare a reference field (parent) with an REQ number which wouldn't work either.