Introduction:

Hey! I’m back with my blog series on Workflows. My last blog was on how to create Custom Workflows in Dynamics NAV….This blog is on how to create Custom Workflows in Business Central..the Extension way!

Pre-requisites:

  • Business Central On-Premise
  • Visual studio code(VS Code)

Steps:

  1. Launch Business Central Administration, and enable the below and restart service instance.

 

1

2

2.  Here, I’m creating a custom workflow for the page Jobs. I’ll be creating new field Approval status and a action button Send approval request.Create a folder. Launch VS code and open the folder just created,

3. Click on new file and create a table extension to add new field “Approval Status” to Jobs also create a page extension to add this field to the page.

3

4

Here, on action trigger, a call is made to the Integration event.

5

4. Create a codeunit called IntCodeunit where an Integration event is created and check is made whether workflow is enabled.

6

5. Create another Codeunit for Event Handing and Response handling of  the custom workflow.

Here is the link to download the source code:

https://github.com/Chris-Dsilva/workflow/tree/master

6. Click on Ctrl+shift+P to download symbols, To build the package click Ctrl+shift+B and to publish the package click F5.

7. Once published you can view it in Extension Management.

7

8. To configure the blog from the front end, have a look at this blog from step 6 https://chrisdsilvablog.wordpress.com/2019/02/01/how-to-create-a-custom-approval-workflow-in-dynamics-nav-part-2/

Happy Weekend!

download (1)