Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
On catalog item view, when I set the requested for variable, my RITM's requested for shows as the user that submitted the catalog item - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • On catalog item view, when I set the requested for variable, my RITM's requested for shows as the user that submitted the catalog item
KB0791093

On catalog item view, when I set the requested for variable, my RITM's requested for shows as the user that submitted the catalog item


2729 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

  • On catalog item view, when I set the requested for variable, my RITM's requested for shows as the user that submitted the catalog item
  • setting my custom requested for variable in catalog item view, does not change it on the RITM when request is submitted

Release

starting Istanbul

Cause

different type of carts [sc_cart]

Resolution

Usually in this type of custom setup, we have a "requested for" variable along with a catalog client script in a variable set, that is responsible for updating the requested_for field of the user's cart. Example:

            //update the cart                       
var cart = new GlideRecord('sc_cart');
cart.addQuery('user', <sys_id_of_logged_in_user>);
cart.query();
if (cart.next()) {
cart.requested_for = newValue;
cart.update();
}

The issue is that the user might have more than one cart, so a better query would be:

 

            //update the cart                       
var cart = new GlideRecord('sc_cart');
cart.addQuery('name', 'DEFAULT');
cart.addQuery('user', <sys_id_of_logged_in_user>);
cart.query();
if (cart.next()) {
cart.requested_for = newValue;
cart.update();
}

In the query above we would want to obtain the DEFAULT cart only.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.