Article

Simplifying Hardware Asset Identification for Transfer Order Lines in ServiceNow

Author: Agus Budi Harto, 2025-07-07 08:27:17

Transferring IT hardware assets within a company is often necessary, especially in organizations with locations spread across the country. For example, new hardware purchases typically arrive at the headquarters, which then ships them to remote offices where the assets will be used.

ServiceNow offers excellent support for managing these asset transfers through its Transfer Order functionality. However, a common challenge arises: the receiving party cannot easily see important asset details, such as the hostname or serial number, in the Transfer Order Line. This lack of visibility can lead to hesitation in accepting the shipment, forcing people to confirm details via other channels (like sending photos over messaging apps).

To address this issue, you can enhance ServiceNow so that recipients can view critical asset details before accepting the shipment. This can be done by adding extra fields to the Transfer Order Line (TOL) table, automatically filled with data from the Hardware Asset table when the sender selects the asset.

Below is a step-by-step guide to implementing this improvement in ServiceNow:


Steps to Add Hostname and Serial Number to the Transfer Order Line

1. Access Transfer Orders

  • Go to the All ? Inventory ? Transfer Orders menu.


  • Choose the Transfer Order number you want to work with.

  • Select one of its Transfer Order Lines.


2. Add New Fields


  • Create two new fields (columns) in the Transfer Order Line table:

    • Host Name

    • Serial Number


  • Place these new fields in the desired position on the form.


  • Don’t forget to Save your changes.


3. Update the Transfer Order View

  • Return to the Transfer Order page.

  • Add the new Host Name and Serial Number columns to the table view to ensure they’re visible during order processing.



4. Create a Client Script

To automatically populate these new fields when the asset is selected, create a Client Script with the following settings:

  • Name: (Choose as needed)

  • Table: alm_transfer_order_line

  • Type: onChange

  • Field: Asset

  • Active: Yes

  • Script:

function onChange(control, oldValue, newValue, isLoading, isTemplate) { if (isLoading || newValue === '') { return; } var assetid = g_form.getValue("asset"); var ga = new GlideAjax("Your_preferred_name"); ga.addParam("sysparm_name", "getAssetSN"); ga.addParam("sysparm_assetid", assetid); ga.getXMLAnswer(getSN); function getSN(response) { var answer = JSON.parse(response); g_form.setValue("u_host_name", answer.hostname); g_form.setValue("u_serial_number", answer.serialno); } }

5. Save and Test

  • Save your Client Script.

  • Now, when a sender creates a Transfer Order and selects an asset to ship, the Host Name and Serial Number fields will automatically populate with the correct data.


Benefits of This Enhancement

  • Greater transparency for recipients about what they are accepting.

  • Fewer manual confirmations through side channels like photos or messaging.

  • Improved accuracy and efficiency in hardware asset transfers.

By implementing this simple customization in ServiceNow, companies can significantly streamline their IT hardware transfer process and reduce confusion or errors during asset receipt.

LinkedIn

Tags: Opinion Servicenow

139 reviews


Add comment