When implementing Dynamics 365 Finance & Operations, there is often a need to add new functionality to the standard system, as well as the need to store additional information beyond the default system. Similarly, it may be necessary to customize F&O workflows to suit the use case to be implemented.

F&O Workflow extension Axazure

Workflow type

Workflows are linked to documents through the type. In the WorkflowTable workflow configuration table, the workflow type associated with each workflow is stored in the TemplateName column.

F&O Workflow extension Axazure
F&O Workflow extension Axazure

Tipo de documento

Each workflow type in F&O is assigned to a document type. This assignment is done through the Document property of the Workflow type object.

F&O Workflow extension Axazure

The document type is an X++ class that is inherited from the WorkflowDocument class. The most important point of this class is the getQueryName method that indicates the name of the Query object that provides the data used by the workflow type to, for example, evaluate conditions and accordingly perform the corresponding actions.

F&O Workflow extension Axazure
F&O Workflow extension Axazure

Objeto Query

The Query object associated with the document type defines the database query to be performed by the workflow during its execution.

F&O Workflow extension Axazure
F&O Workflow extension Axazure

It is at this point in the architecture that the extension mechanisms of Dynamics 365 Finance & Operations come into play. By extending the Query object it is possible, for example, to add additional fields to be subsequently accessed from the workflow.

F&O Workflow extension Axazure
F&O Workflow extension Axazure
F&O Workflow extension Axazure

I hope you liked it, and I hope you find it useful, see you next time! 😊

About the Author: Adrián Camargo

F&O Workflow extension Axazure
D365FO TECH

Do you want to share?