- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2014 07:54 PM
I want to get a variable value from the RITM record, the value is from one of the request form. I try to get it from the 'sc_item_option_mtom' table, but i did not work.
var scOption = new GlideRecord('sc_item_option_mtom');
scOption.addQuery('request_item.number','RITM2061426');
scOption.query();
while(scOption.next()){
//get the value of the term_date
gs.log("Term Date="+scOption.sc_item_option.term_date.value);
}
Are there any questions about this?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2014 08:50 PM
Don't have my reference handy of our implementation. I am quite sure however, you should be able to do a gliderecord lookup to the sc_req_item. This is assuming your variable is attached here - which it normally would be - but i've seen some funnny implementations.
so... you can copy this exactly - just change the "YOURVARIABLENAME" with the name of the variable you are referencing. (This would be the "item_option_new" table. The element is "name'.
var gr = new GlideRecord('sc_req_item');
gr.addQuery('number', 'RITM2061426');
gr.query();
if (gr.next())
{
gs.log(gr.variable_pool.YOURVARIABLENAME);
}
Please let me know if you struggle, I use this kind of lookup for many different validations / process steps from Service Catalog.
Regards
Willem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2018 05:53 AM
Thank you Sir!!