When a record is inserted or updated in a D365 F&SCM table for which data entry workflow SQL triggering is set up, the table event (Insert or Update) is logged in the Data synchronization log.
To start a data entry workflow, you must process the logged table events from the data synchronization log. This processing is done based on the Workflow template SQL trigger assignment.

This topic explains how to set up the Workflow template SQL trigger assignment.

Note: You set up a workflow template SQL trigger assignment for a specific data entry workflow template version.


Standard procedure

1. Go to Data entry workflow > Design > Data entry workflow templates.
2. In the list, find and select the desired data entry workflow template.
 

Note: If you want to set up the SQL trigger assignment for another version of the data entry workflow template, first select the other version.

3. On the Action Pane, click Versions.
4. Click Workflow template SQL Trigger assignment.
5. Click New.
6. In the SQL Trigger field, enter or select a value.
7. Define the workflow document root record for which the data entry workflows must be created.
  In the Root document record field, enter or select a value.
8. You can create a data entry workflow for specific records. To define the record criteria, use a dynamic query or the Inquiry (SysQueryForm) page.
  Select the Use query criteria check box.
9. Sub-task: Use inquiry.
  9.1 You can define the record criteria using the D365 F&SCM Inquiry (SysQueryForm) page.
  In the Query type field, select 'Inquiry'.
  9.2 You must edit the inquiry. At least, enter a query value.
  Click Edit query.
  9.3 In the Criteria field, type a value.
 

Note: You can extend the inquiry setup as desired.

  9.4 Click OK.
10. Sub-task: Use dynamic query.
  10.1 You can define the record criteria using a Dynamic query.
  In the Query type field, select 'Dynamic query'.
  10.2 In the Query field, enter or select the desired dynamic query.
11. Close the page.

Notes

You can also set up the Workflow template SQL trigger assignment from the SQL trigger page:

  • Go to Data entry workflow > Setup > SQL Trigger.
  • Select the desired SQL trigger.
  • Click Workflow template SQL trigger assignment.

When opened this way, only active data entry workflow templates are shown:

  • If you assigned an inactive data entry workflow template to a SQL trigger on Data entry workflows templates page, this assignment is not shown.
  • If you create a new assignment, the lookup of the Workflow version field only shows active Data entry workflow templates.

Note: A data entry workflow that is activated in test mode is not shown as well.

See also

Provide feedback