Free Service Portal Widget: Related Lists

nathanfirth
Tera Guru

To help contribute back to the community, we're going to try to develop and give away one new widget per month.

For January we have developed the "Related List" widget, which allows you to display related lists on the form page in Service Portal.

Example below from a service catalog request:

Screen Shot 2017-01-12 at 10.20.55 AM.png

To download the widget, it's available on ServicePortal.io: Free Widget of the Month - ServicePortal.io - Service Portal, CMS, and Custom Apps

65 REPLIES 65

anatara
Giga Contributor

When we use this widget, it is working for ITIL users but not for ESS users who has(snc_internal) role. ESS users not able to view the whole widget even though records are viewable in Platform after we opened the ACL.

 

Is there a any way to fix this ?

Anne21
Kilo Contributor

Hi Nathan,

 

Quick question - I put this Related List widget on a custom page that has the Form widget and an Icon Menu List widget. When I try to route to this custom page by clicking into a record from the Data Table from URL Definition widget, I am sometimes re-routed to the homepage (index) of the Service Portal and sometimes I am routed to the page that the Related List widget should be routing to.

 

Do you have any idea why this might be?



Thank you for your help,

Annie

MattSN
Mega Sage
Mega Sage

Seeing as this is a popular free widget in the community, I thought some might benefit from this info since the issues described with page routing are related to Paris and newer.

A ServiceNow KB that explains the issue - https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0867532 

An updated version of the client controller/client script in the widget that will address this issue. The only catch is if you use the option it will place the sys_id of the page instead of the display value in the url. Less pretty, but functional.

function($rootScope, $location) {
	/* widget controller */
	var c = this;

	$rootScope.$on('data_table.click', function(event,obj) {
		console.log(obj);
		var link = {};
		link.sys_id = obj.sys_id;
		link.table = obj.table;
		link.id = c.data.page;
		//$location.search(link);
		//location.search = '?id=form' + '&table=' + link.table + '&sys_id=' + link.sys_id;
		 if (c.options.page) {
 			var page = c.options.page;
 		}
		if (!c.options.page) {
			var page = "form";	
		}
		location.search = '?id=' + page + '&table=' + link.table + '&sys_id=' + link.sys_id;
	})

}

 

rajsrajpoot
Kilo Contributor

Hi @nathanfirth

Thanks for sharing this widget. I have recently used the widget and everything works well except for the defined related list (REL type list).

I have a defined related list which is showing correct count and records in ITIL view but showing all the records in this widget. 

Has anyone encountered the same issue ? Thanks in advance for your help.

Best, 

Raj

I am facing the same issue, @rajsrajpoot  Have you get this working?