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.
File Attachment functionality defined in a custom UI macro and added to an Item via variable does not work on an Order Guide - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • File Attachment functionality defined in a custom UI macro and added to an Item via variable does not work on an Order Guide
KB0546864

File Attachment functionality defined in a custom UI macro and added to an Item via variable does not work on an Order Guide


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

Description

When using a UI macro as an item variable, an attachment link in the code works when browsing the item, but does not work when the item is included in the Order Guide.

Steps to Reproduce

 

  1. Create a UI macro and include add attachment link in the code.

    For example: <?xml version="1.0" encoding="utf-8" ?> <j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"> <b>Use the paperclip</b> <a onclick="saveCatAttachment(gel('sysparm_item_guid').value, 'sc_cart_item')"> <img title="Attachments..." height="16" src="images/icons/attachment.gifx" border="0" width="16"/></a> <b>to attach items to this request.</b> </j:jelly>

  2. Create a variable and set the condition Type is Macro. Use the macro you just created.

  3. Attach the variable to a service catalog item and try the item.

    The link to add attachment works.

  4. Create a test order guide and include the item created in the rule base.

  5. Try the Order Guide.

    The link to add attachment for the item doesn't work.

Note, the attachment link in the cart template works (the macro in the base system is servicecatalog_cart_template. Use the following link: <a onclick="saveCartAttachment('$[sc_cart.sys_id]');">.

Although this could be a workaround for the client, the client would need to attach files to each item in an order guide.

Workaround

Do not add an attachment to an item in the order guide. Instead, add the attachment during the checkout process:

  1. Select Checkout.
  2. Select Edit to add the attachment to the cart item.
  3. Select Update Cart, and proceed as normal.

The requested item will then have the attachment.


Related Problem: PRB613156

Potentially Seen In

There is no data to report.

Fixed In

Istanbul

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.