Sample: Determine the total quantity of all items on a sales order
Step 1:
Create Saved Transaction Search

For our Results, we only need to include the field that we are calculating on. In this example, it’s the Quantity field. Once we choose the field, we will use SUM as our Summary Type.

Set a Filter on the Available Filters tab. This will allow the Saved Search and custom field to be able to identify which data to return. In this example, we want to identify the sales order transaction we are viewing so we’ll use the Internal ID field.

The result will be:

Step 2:
Create custom Field:

Now the value will be populated in Sales Order.