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

m-sono
Tera Contributor

pavan9885
Tera Guru

I have mandatory fields which need to be filed before record submission but its getting submitted without cross check any inputs on this .

SamuelTse
Tera Guru

Hi @nathanfirth,

I ran into a situation with the widget and I don't know how to deal with it. I have your widget inside a modal. Since your widget board cast the click event to the rootscope, when the modal is closed and no row is clicked in the related list, the event listener remains in the rootscope. How can i kill listener in the rootscope or how to prevent duplicate event to be board casted? If I don't kill it, the next time i click on a record in the related list, it will open up two modals.

I hope it makes sense. 

Sam

 

 

 

Janel
Kilo Sage

When using this widget by going directly to a URL it works great.  Thanks for putting this together.

I have one page that is a single page layout.  It has some stuff on the left (your assets, employee's assets, work orders, etc.) and when you click it, it opens a cloned version of the form widget to the right.

find_real_file.png

In the related list widget, I added the $rootScope.$on event to listen for the event being broadcasted when an item is clicked from the left (copying and pasting what you already had in there and just changing the name).  You can see the form start to load, and then it just dumps me back to the portal homepage.

Instead of displaying the related list at the bottom of the form, you just get redirected back to the portal's homepage.

If I take out the "$location.search(link);" in the controller it doesn't redirect, but obviously doesn't display the related list either.

If I pass the page as part of the event object it does work, but it is reloading the page.  Is there any way to have this widget listen and load without reloading the current page?

Anne21
Kilo Contributor

Hi Janel,

 

Are you able to share the code for your custom widgets? I am working on something very similar.


Thank you,

Annie