Scenario
A Custom Sales Order Workflow was created to compare two date fields. The date fields were used on a Set Field Value action as a condition wherein if the Workflow Date field is greater than or equal to the Transaction Line Item Date field, then it will check a checkbox after the record was created.
Solution
The solution is to create a Custom Transaction Line Field that will source the date value from the Item record and use it instead of a Workflow Field.
- Create the Custom Transaction Line Field
- Navigate to Customization > Lists, Records, & Fields > Transaction Line Fields > New
- Enter the following criteria:
- Label: Enter Label (e.g. Test Item Date Field)
- Type: Select Date/Time
- Store Value: Enter Checkmark
- Under Applies to tab, mark the Sale Item checkbox
- Under Sourcing & Filtering tab, add the following:
- Source List: Select Item
- Source From: Select Date Created
- Click Save
- Modify the Custom Sales Order Workflow
- Navigate to Customization > Workflow > Workflows
- Edit the desired Custom Sales Order workflow
- Double-click State 1
- Click the existing Set Field Value for the date field
- Edit the condition by clicking the Arrow icon at the right
- Enter the following criteria:
- Field: Select Date
- Compare Type: Select greater than
- Value Field: Select Test Item Date Field
- Click Add
- Click Save
- Click Save