How to: Enable a Form or List for Workflow

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

In Microsoft Dynamics AX, each form or list that is to be used by workflow must be enabled for workflow. This topic describes the steps to enable a form for workflow. It also describes the steps to enable a list for workflow.

When a form is enabled for workflow, the workflow menu bar is automatically inserted at the top of the form, below the form title bar or action pane. The workflow menu bar provides everything that you must have to interact with a workflow. The menu bar contains workflow action buttons, such as Submit and Complete, and data fields that contain workflow instructions, configuration name, and information icons.

To display the Submit button, the form must have a canSubmitToWorkflow method.

Note

The form data source, or table, must contain a field for the workflow state of the document. For example, a field that contains the workflow state NotSubmitted should be updated to Submitted when the user clicks the Submit button on the form. For more information, see Workflow Approval State Transitions and How to: Enable a State Model for a Workflow Document.

To enable a form for workflow

  1. In the Application Object Tree (AOT), expand the Forms node.

  2. Expand the form that you want to enable for workflow, and then expand the Designs node.

  3. In the Designs node, right-click the Design child node, and then click Properties.

  4. In the Properties sheet, set the following properties.

    Property

    Value

    WorkflowEnabled

    Set to Yes to enable the workflow menu bar on the form. The default setting is No.

    WorkflowDataSource

    Set to the same root data source specified in the query used for the Document property on the workflow type. For more information, see How to: Create a Workflow Document Class.

    WorkflowType

    Set to the workflow type that you want to use for the list.

  5. In the AOT, right-click the form, and then click Save.

To enable a list for workflow

  1. In the Application Object Tree (AOT), expand the Forms node.

  2. Expand the form for the list that you want to enable for workflow, and then expand the Designs node.

  3. In the Designs node, right-click the Design child node, and then click Properties.

  4. In the Properties sheet, set the following properties.

    Property

    Value

    WorkflowEnabled

    Set to Yes to enable the workflow for the list. The default setting is No.

    WorkflowDataSource

    Set to the same root data source specified in the query used for the Document property on the workflow type. For more information, see How to: Create a Workflow Document Class.

    WorkflowType

    Set to the workflow type that you want to use for the list.

  5. In the AOT, right-click the form, and then click Save.

See also

Requirements for Enabling Workflow in an Application Module

How to: Enable a State Model for a Workflow Document

Workflow Approval State Transitions

How to: Create a Workflow Document Class

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.