Order Management - CSM/FSM Workspace

Aishwarya Pati1
Tera Contributor

Hi all, 

 

Could you please help me find out how this layout is appearing on the order form in the CSM/FSM Workspace please? I have checked the order form layout, but this section is not configured there. I need to update the fields appearing in this layout. 

 

Thanks in advance!

Screenshot 2024-12-17 at 10.57.25.png

1 ACCEPTED SOLUTION

Kenny Caldwell
ServiceNow Employee
ServiceNow Employee
Hi Aishwarya Pati1,
The short answer is that you can modify the script include OrderUtil which an OOB script include designated for customer overrides.
 

After overriding you can review the return JSON by running the following from Scripts – Backgroud.

var orderInfo = new sn_ind_tmt_orm.OrderUtil().getOrderDetailsJSON('Put SysId of order here');
gs.info(JSON.stringify(orderInfo));

 

Overriding OrderUtilOOB

This script include 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 the part of the JSON which displays in the Order Summary Container is the contact_fields of contact_card.

 

contact_cards contact_fields.png

 

You will need to copy the whole method generateDetailsJSON and put it into the script include OrderUtil and then modify contact_fields to display the desired information. For example you could remove State from the contact_fields. In the image below State which was below City has been removed. 

 

contact_cards contact_fields remove state.png

View solution in original post

6 REPLIES 6

Kenny Caldwell
ServiceNow Employee
ServiceNow Employee
Hi Aishwarya Pati1,
The short answer is that you can modify the script include OrderUtil which an OOB script include designated for customer overrides.
 

After overriding you can review the return JSON by running the following from Scripts – Backgroud.

var orderInfo = new sn_ind_tmt_orm.OrderUtil().getOrderDetailsJSON('Put SysId of order here');
gs.info(JSON.stringify(orderInfo));

 

Overriding OrderUtilOOB

This script include 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 the part of the JSON which displays in the Order Summary Container is the contact_fields of contact_card.

 

contact_cards contact_fields.png

 

You will need to copy the whole method generateDetailsJSON and put it into the script include OrderUtil and then modify contact_fields to display the desired information. For example you could remove State from the contact_fields. In the image below State which was below City has been removed. 

 

contact_cards contact_fields remove state.png

Thank you Kenny. This solution is wonderful!