Service Portal Widget "Server Script" function($sp) or function()?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2019 10:09 AM
Should I be putting $sp as a function parameter or not? It seems to work either way.
(function() {
var cat_item_SYSID = $sp.getParameter('sys_id');
})();
OR
(function($sp) {
var cat_item_SYSID = $sp.getParameter('sys_id');
})();
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2019 02:48 AM
Thanks for that link. It was quite informative.