Configure fields in contract template to display correct sys_id value in contract documents

  • Freigeben Version: Australia
  • Aktualisiert 12. März 2026
  • 1 Minute Lesedauer
  • As a contract configurator, update an advanced script to print the correct display value for sys_id variables in the generated contract document.

    Vorbereitungen

    Role required: sn_cm_core.contract_config

    Warum und wann dieser Vorgang ausgeführt wird

    Because the script for mapping variables using the Microsoft Word add-in for ServiceNow Contracts uses the toString() function for the sys_id variable, its display value is not replaced properly in generated contract documents.

    Prozedur

    1. Navigate to All > Contracts Core > Contract Administration > Contract Templates.
    2. Open a contract template.
    3. Navigate to the Template mapping related list.
    4. Select the field for which the advanced script is enabled and the display value is not shown properly.
      Field details are displayed along with the advanced script.
    5. In the script, replace the occurrences of toString() with getDisplayValue().
    6. Select Update.