Workflows are created in Dynamics 365 Business Central offers a platform to build instructions for automated commands.This functionality is very useful for automating processes such as notifications, approvals etc.When a workflow is enabled for any object then it performs a series of steps one after the other automatically and carry out actions as specified in the workflow. We often have a necessity to create a new workflow other than the standard workflow which are not present in the Dynamics 365 Business Central standard template list.
Dynamics 365 Business Central
In this manufactured article, I shall be giving the technique to produce a custom workflow by creating new functions in Dynamics 365 Business Central and would also be implementing new workflow events& responses. This procedure allows to create a custom workflow for any custom object.
Step-1: Add a‘Budget Internal Status’ Field of Option type on table you want to add Workflow process.
Step-2: Create A code-unit ‘AXP Proj Budg. approval Mgmt’ and add following Global variables.
Step-3: Add following global Methods, Publisher and Event subscriber Methods.
Step-4: Add following global Methods and Event subscriber Methods.
Step-5: Add following Event subscriber Method this method allows to update ‘Approval Entry’ table when an approval request is triggered.
Step-6: Add Global Variable and an Action on Page. Add following code OnAction Trigger in order to generate the Approval request.
Note:This is the first part of Blog which is related to technical side. In the second part, I’ll show how to configure and enable customized workflow in Dynamics 365 Business Central.