Kenny Caldwell
ServiceNow Employee
ServiceNow Employee

I recently helped a customer understand how to change the information presented in the customer account information and order overview sections on the Order form in CSM/FSM Workspace. Here's how...

 

Here we see an Order form with account information and order overview sections highlighted.

Order Form.png

 

To change the information presented in these sections we need to modify the script include OrderUtil which is an OOB script include designated for customer overrides.

 

After overriding you can review the returned JSON by running the following from Scripts – Background.

 

 

 

var orderInfo = new sn_ind_tmt_orm.OrderUtil().getOrderDetailsJSON('SysID of the Order');
gs.info(JSON.stringify(orderInfo));

 

 

 

 

Overriding OrderUtilOOB

The script include OrderUtil extends the script include OrderUtilOOB.

OrderUtil.png

 

The method in OderUtilOOB which needs to be overridden is generateDetailsJSON.

OrderUtilOOB - generateDetailsJSON.png

 

In the method generateDetailsJSON, customer account information is contained in contact_card and Order Overview information is contained in label_value_stacked_items.

OrderUtil - Contact Card.png

 

OrderUtil - label value stacked items.png

 

Copy the method generateDetailsJSON and put it into the script include OrderUtil and then modify contact_card and label_value_stacked_items to display the desired information. For example you could remove State from the contact_fields. In the image below, State was below city but it has been removed.

contact_cards contact_fields remove state.png