Display name on Asset (Alm_hardware) not displaying properly

j_52
Kilo Contributor

I created asset with the model and asset tag value and it suppose to populate the combination of Model + Asset tag = Display name . see the screenshot. what could be the issue.

find_real_file.png

 

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

is this happening for all records?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

it is happening to all the records

Snehangshu Sark
Mega Guru

Hi J,

 

Check if you are using getDisplayValue('serial_number') in your script. 

 

Regards,

Snehangshu Sarkar

 

Please mark an appropriate response as correct if my answer replied to your question.

Scott Halverso1
Mega Guru
Mega Guru

This is out-of-box functionality calculated with the AssetUtils script include. Has that been modified?

 

AssetUtils()calculateDisplayName 
calculateDisplayName: function(asset) 
    calculateDisplayName: function(asset) {
        var display_name = "";
        if (asset.asset_tag)
            display_name += asset.asset_tag + " - ";
        if (asset.model)
            display_name += asset.model.display_name;

        if (asset.display_name == display_name)
            return false;

        asset.display_name = display_name.trim();
        return true;
    },