Approval tab (related list) in scoped app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 07:33 PM
Hi All,
I have a scoped app that is being worked on and want to be able to have the approvals tab in the related lists. The table doesn't extend the task table.
If I try add the list it's not an option in there. I've tried in scoped app view and also in global and all I get is below. How can I add it?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 03:01 PM
I can see it's following the work flow and when approved next approval is generated etc. Just not showing in the ticket history or in the approval tab. I'd rather not delete this scoped app and start again extending from task but maybe that's what I need to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 07:18 PM
approval for gets filled when your table extends task
Please extend your table with task and update the script as this
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
current.addEncodedQuery("sysapproval", parent.sys_id);
})(current, parent);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 07:26 PM
Hi Ankur,
But since the table is created I can't extend now can I, I tried in the tables section and it won't let me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 07:46 PM
Hi,
if there is not much data into that table then I would suggest to delete and create new one which extends task
OR
there is workaroud but not recommended
How to extend Task table after Custom table creation?
If my response helped please mark it correct and close the thread so that it benefits future readers.
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 08:10 PM
Hi
Extending task was the OOB way Or else you can create an m2m table between your custom table and User table and name it as Approvals.
To create this, you can navigate to sys_m2m.list, create a new entry, select from and To table and and a name for your related list and submit it.
A new many to many list with the name will be added in your related list.
You can configure it and add on form layout and then edit users into it.
Note: This does not get the features of OOB approval table.
https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/table-administration/task/t_CreateAManyToManyRelationship.html
https://docs.servicenow.com/bundle/sandiego-platform-administration/page/administer/table-administration/task/t_CreateAManyToManyRelationship.html
Screenshot for reference on how to do this:
Now once you define this, just navigate to your Custom table form layout and Right click on the form header and then select Configure-->related List and add this new related list and you should be good here.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke