Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Create macros for cart layout example

Log in to subscribe to topics and get notified when content changes.

Create macros for cart layout example

This example demonstrates the script to add a Requested for reference field as a widget macro to a cart layout record.

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
    <j:set var="ref" value="sc_cart" />
    <j:set var="jvar_ref" value="${jvar_cart.getRequestedFor()}" /> 
    <j:set var="jvar_ref_display" value="${jvar_cart.getRequestedForDisplayName()}" />
    <tr>
        <td colspan="3">
            ${gs.getMessage('Requested for')}:
        </td>
    </tr>
    <tr>
        <td colspan="3" style="padding: 4px;">
            <g:catalog_requested_for />
        </td>
    </tr>
</j:jelly>
Feedback