Below are the steps that we may follow in order for us to create a Custom Body Field that will show the Total Amount of the line Items with a specific Item. For example, the customer wants to show the total if the Item is 1231212&.
1. Create a custom line field to get the amount of the item if it is the Test example
Note that on my end, I am using the item 1231212&
1. Navigate to Customization > Lists, Records, & Fields > Transaction Line Field > New
2. Label: Enter Label
3. Type: Select Free-Form Text
4. Store Value: Remove Checkmark
5. Click Applies To
• Sales Item: Enter Checkmark
6. Click Validation & Defaulting tab
• Default Value: Enter case when {item} = '1231212&' then {amount} else 0 end
Note: Change 1231212& to your desired item
7. Click Save
This will show us the amount of the item if it is 1231212&
2. Create a Custom Body field to show the total amount of the items
1. Navigate to Customization > Lists, Records, & Fields > Transaction Body Fields > New
2. Label: Enter Label
3. Type: Select Free-Form Text
4. Store Value: Enter Checkmark
5. Click Applies To
○ Sale: Enter Checkmark
6. Click Validation & Defaulting tab
§ Default Value: Enter 0
7. Click Save
3. Create a workflow to set the Custom Body Field
1. Navigate to Customization > Workflow > Workflows > New
2. Basic Information:
• Name: Enter Name
• Record Type: Select Transaction
• Subtype: Select Sales Order
• Execute As Admin: Enter Checked
• Release Status: Select Released
• Initiation: Select Event Based
3. Event Definition:
• On Create: Enter Checkmark
• On View or Update: Enter Checkmark
4. Click Save
5. Click State 1
6. Bottom right corner: Click New Sublist Group
7. Basic Information:
• Trigger On: Select After Record Submit
8. Parameters:
• Sublist: Select Item
9. Click Save
10. Click Sublist Action Group
11. Bottom right corner: Click New Action
12. Click Set Field Value
13. Parameters:
• Field: Select the field created on step 2
• Formula: Enter {custbodyxxx}+{line.custcolyyy}
Note: change the custbodyxxx to the ID on the Custom Field created on step 2 and change the custcolyyy to the ID of the custom column field on step 1
14. Click Save
This should show us the correct total of the items
Hope this work on your end too
Let us know if you have a different workaround regarding it.