Is it possible to edit the \$sp.getCatalogItem(data.sys_id, true); method?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2018 11:23 PM
Hi All,
I have to modify the data getting from $sp.getCatalogItem(data.sys_id, true); method. can edit it.
If yes, How to edit?
Thanks.
- Labels:
-
Service Level Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 02:38 AM
It's not possible, as this method is defined inside the core code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2018 11:31 PM
Hello Chetan,
You can try below code:
data.sc_cat_item = $sp.getCatalogItem(data.sys_id, true);
if (data.sc_cat_item.sys_id= 'item sys_id')
{
//I think Based on above condition you can modify the data
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2019 03:36 AM
I need the same. I put a custom true/false flag on the item_option_new table, and need to be able to read that value before the form loads on the SP.
So... even though $sp.getCatalogItem() may not be interceptable, I believe there's a solution to my need. I'll post back with my results.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2019 04:22 AM
So, my personal requirement was to have Catalog Item Variables that were not visible/interactable when filling out and submitting the form, but were only to be used/interacted with by Fulfillers that worked the Catalog Task (sc_task) generated by the workflow.
Think of it as a "Fulfiller only" variable set. This is extremely valuable to us because we wanted to make workflow decisions made based on variable options that the fulfiller chose.
Anyway... the first part was to add a new field on the Variable (item_option_new) table:
Here is when I choose it:
Now, here is how I make it truly "Not Visible" on the form:
I edit the Server Script portion of the widget that displays a catalog item form, then I change 1 line, and add 1 function.
Here is the line I edit (my addition is highlighted):
And here's the function:
I hope someone out there finds this useful.