Referencing "Request For" While Ordering a Catalog Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2009 04:53 AM
Does anyone know of a way to grab the 'Request For' value (from the main catalog page) from within a catalog item?
We fear that some of our users will over-look the "Request For" field, which should be defaulted to their User ID. So, they'll click on an item and fill out the 'request for' information (variables) of someone other than themselves, but in actuality, the request will still say it's requested for the person making the request. It would be nice if on load of the item, we could pass the 'request for' value from the main catalog page to the item, and auto-populate some of the user's info. If the 'request for' is changed from within the item, ideally we'd like to pass that value off to the request.
Has anyone done this? If so, we'd really appreciate some guidance!
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2013 08:28 PM
Hi Jim, were you able to find a solution to this. We also have high security enabled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2013 01:14 PM
I too have this issue, being an ITIL or end user, I am not able to see the client script working. I think that there are some ACLs either misssing or the existing one are restricting the other roles than admin to access sc_cart table. Unfortunately, I dont have complete admin access on our instance to verify the ACLs on sc_cart table and ServiceNow has disabled access to ACL on demo instances.
Can anyone provide more information on this issue?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2013 08:45 AM
We have just started testing calgary in one of our instances and are having problems using the following onSubmit script as described above.
function onSubmit() {
var for_userid = g_form.getValue('name' );
var userid = g_user.userName;
var cart = new GlideRecord('sc_cart');
cart.addQuery('user.user_name', userid);
cart.query();
if (cart.next()) {
cart.requested_for = for_userid;
cart.update();
}
}
Worked fine in Berlin, but now in Calgary it seem to be creating multiple carts and causing empty carts to appear to the user.
Has anyone successfully used this in Calgary yet?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 06:39 AM
Try to use
g_form.getValue("sc_cart.requested_for");
from the Client Script.