web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Implementing Custom Workflow with Approval Actions in Business Central

(1) ShareShare
ReportReport
Posted on by 137

Requirement:

 

I need to implement a custom workflow for a custom page in Business Central.

 

Specifically, I want to:

 

  • Add "Send for Approval" and "Cancel Approval" actions, similar to what's available in standard pages like the Purchase Order.

  • Allow users to open the Workflow Setup, where they can configure workflow events and responses as needed.

  • Create custom events and responses.


  •  

Objective:

 

My goal is to achieve functionality similar to the standard Purchase Order approval workflow, but for a custom page.

 

Could you guide me on how to implement this?

 

Thank you!

 
I have the same question (1)
  • Suggested answer
    Rishabh Kanaskar Profile Picture
    3,413 on at
    Implementing Custom Workflow with Approval Actions in Business Central
    Hi,
     
    To implement a custom workflow with approval actions on a custom page in Business Central:
    Create a Workflow Table
    > Define a table to store workflow entries for your custom page.
    > Include fields like Document No., Status, Requested By, Approver, Date Sent, etc.
     
    Create a Workflow Codeunit
    > Add procedures for SendForApproval and CancelApproval.
    > Update workflow table and raise events like OnBeforeSendForApproval and OnAfterSendForApproval.
     
    Define Events for Workflow
    > Use IntegrationEvent in your table/codeunit for key workflow points (e.g., OnApprovalRequested, OnApprovalCanceled).
     
    Add Actions on the Page
    > Add actions on your custom page for Send for Approval and Cancel Approval.
    > Call your codeunit procedures from these actions.
    > Enable/disable actions based on workflow status.
     
    Workflow Setup Page
    > Create a standard BC-style workflow setup page if you want admins to define events/responses.
    > Link the setup to your workflow table for configuration.
     
    Approval Handling
    > Create a separate approval codeunit or extend your workflow codeunit.
    > Include logic for notifying approvers (email or in-app notifications).
    > Update workflow status when approved/rejected.
     
    Testing
    > Ensure the workflow responds to status changes correctly.
    > Validate that Send for Approval cannot be executed twice for the same record.
    > Test integration with any notification mechanism.
     
    You essentially replicate the standard Purchase Order workflow logic but use your custom table, codeunit, and page.
     
    Thanks
    Rishabh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 3,844

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,010

#3
Sumit Singh Profile Picture

Sumit Singh 2,815

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans