- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2018 10:13 AM
Is anyone aware of documentation on the use and functionality of spScUtil? I'm working on some tweaks to the new SC Catalog Item (v2) widget and I can't seem to find anything about it...
function postCatalogFormRequest() {
console.log("Start postCatalogFormRequest()");
$scope.submitting = true;
if ($scope.data.is_wishlist_item) {
$scope.is_update_wishlist = false;
$scope.data.show_wishlist_msg = false;
if ($scope.data.sc_cat_item.sys_class_name === "sc_cat_item_producer")
return spScUtil.submitWishlistedProducer($scope.data.sc_cat_item.sys_id, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
else if ($scope.data.sc_cat_item.item_action === "order")
return spScUtil.orderWishlistedItem($scope.data.sc_cat_item.sys_id, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
else if ($scope.data.sc_cat_item.item_action === "add_to_cart")
return spScUtil.addWishlistedItemToCart($scope.data.sc_cat_item.sys_id, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
}
else if ($scope.data.is_cart_item)
return spScUtil.updateCart($scope.data._generatedItemGUID, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields));
else if ($scope.data.sc_cat_item.sys_class_name === "sc_cat_item_producer")
return spScUtil.submitProducer($scope.data.sc_cat_item.sys_id, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
else if ($scope.data.sc_cat_item.item_action === "order")
return spScUtil.orderNow($scope.data.sc_cat_item.sys_id, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
else if ($scope.data.sc_cat_item.item_action === "add_to_cart")
return spScUtil.addToCart($scope.data.sc_cat_item.sys_id, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2018 05:06 PM
Looks like its one of the file libraries SN includes.
I see it here;
You can see your version of it by navigating to ;
https://hi.service-now.com/scripts/app.$sp/service.spScUtil.js

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2018 05:06 PM
Looks like its one of the file libraries SN includes.
I see it here;
You can see your version of it by navigating to ;
https://hi.service-now.com/scripts/app.$sp/service.spScUtil.js
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2018 08:30 AM
Thanks! Out of curiosity how did you know where to locate that in HI?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2018 10:15 AM
That git repo has a script that reads a few endpoints and SN is nice enough to list the sources of their files. So I just have it hit all the linked files it can cause the front end stuff taht is file based we don't see. I started tracking those changes.
if you open any page and do a crtl+f in your console for '/scripts/' you should see the comments like i'm suggesting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2018 03:38 PM
Thank you so much for sharing this information!