How to approach the fields of the SC_CAT_ITEM table from within Service Catalog req.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2008 07:17 AM
Hi
I'm trying to get a value from a field the sc_cat_item table.
For instance automatically selecting Approval Scheme that is dependant on a Catalog variable. How can i reach this from witrhin Catalog Client script?
I cannot find any documentation on this subject.
Thanks
Ritesh
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2008 07:29 AM
the variables have the name:
current.variable_pool.phone_number
(if your variable was named phone_number)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2008 07:29 AM
The sc_cat_item table is on the server, not the client, so anything you chose to do would require using client side glide record and looking up the data over the wire. That will, inevitably, introduce some network latency into your app.
However, with that caveot out of the way you can access the uderlying item with something like this:
function onLoad() {
var id = gel('sysparm_id');
if (!id) {
alert('Could not find item id, returning');
return;
}
var gr = new GlideRecord('sc_cat_item');
gr.addQuery('sys_id', id.value);
gr.query();
gr.next();
alert('Current item delivery plan is ' + gr.delivery_plan);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2008 04:28 PM
Hi Pat,
Thanks for this solution. This works for items however it does not work for order guides.
I always get back the alert ('Could not find item id, returning') whatever i try.
I hope you could give me the solution to get this working for order guides,
Regards,
Ritesh