Hi all, I'm trying to create a custom transaction ...
# general
h
Hi all, I'm trying to create a custom transaction body field that calculates the SUM of the qty of all inventory items on the order. Can someone help suggest a formula to use for this custom field?
a
This can’t be done by a formula You could make a summary saved search and use that to source the value of a field
👍 1
s
You could also potentially run a UE script that grabs all sublist member qtys, sum them, then write to the field beforeSubmit.
👍 1
h
Thanks for your input @AI1 & @Scruffy! I ended up deriving it from a summary search. I built the following saved search: • Criteria: ◦ Type = Sales Order ◦ Item: Type = Inventory Item ◦ Closed = False • Results: ◦ Field: Formula (Numeric) | Summary Type: Sum | Formula: CASE WHEN {item.type} = 'Inventory Item' THEN {quantity} ELSE 0 END • Available Filters: ◦ Internal ID Then I selected that search under 'validation & defaulting' on the transaction body field.