Approval tab (related list) in scoped app

MichaelW
Tera Contributor

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

 

find_real_file.png

26 REPLIES 26

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.

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

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.

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

Extends Table AFter Creation

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

shloke04
Kilo Patron

Hi @Michael W .

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:

find_real_file.png

find_real_file.png

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

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke