Free Service Portal Widget: Related Lists
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 10:26 AM
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:
To download the widget, it's available on ServicePortal.io: Free Widget of the Month - ServicePortal.io - Service Portal, CMS, and Custom Apps
- Labels:
-
Service Portal
- 17,513 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2017 04:25 PM
Hi Nish,
That code snippet looks right, as it just looks like the code directly from the widget.
What are your thoughts from the results you see from the test harness widget?
Cheers,
Arthur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 10:58 PM
Hello Arthur Cheung,
I have implemented the way you have told in the steps. But i am confused with the underscoremin.js . I followed the steps in the document you have attached. But still getting the error that underscore is not defined. Any suggestions or solution ?
Thanks,
Ruthra.v
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 04:06 PM
Hi Ruthra,
I forgot to mention one small note required while adding underscore.
As per the instructions on that site, you would have added into a script include named "underscore-min.js". As shown on that site, in normal back end scripts (as opposed to server scripts in widgets), you could then use underscore in your script after including it using:
gs.include('underscore-min.js');
However, it appears server scripts in widgets work a bit differently. From my observations, I think they automatically include script includes. However, in this fashion, you need to call the script include via the name of the script include. So if you named it "underscore-min.js" you would need to call it by that name. Of course, this makes it very cumbersome to call in the code (not to mention the period in the name probably provides you problems as well).
So... TL;DR:
Just change the name of your script include to "_" instead of "underscore-min.js", and it'll work.
Cheers,
Arthur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 10:52 PM
Hello Arthur,
Thanks a lot. That solved the issue.
Regards,
Heera
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2017 03:10 PM
Thanks for this info Arthur. We were close to fully building this out ourselves and you saved us a lot of time and heartache. Cheers!