Integration existing dynamics 365 business central functionality with status management

Status Management  •  Article  •  4/29/2023  • 

The use of standard Business Central functionality may overlap with the functionality of the Status Management extension. As an example, the functionalities prepayments and approval entries impose specific business rules that impact if the status of a Purchase or Sales Order may be set to Released. Status Management does the same, thereby possibly overlapping or extending the standard functionality.

To provide a single and consistent workflow to the end-user, it is wise to take standard functionalities into consideration (if used) when designing or modifying Status Management Flows for Purchase or Sales Orders.

In the steps below, it is described how to achieve this for functionalities Prepayments and Approval request via workflows. Additional information on Prepayments and Approval Requests can be found on the Microsoft Dynamics 365 Business Central documentation.

Incorporate prepayment into status management flows

Assume that for a specific set of customers, prepayment is requested before Sales Orders may be set to released. This implies that multiple activities and roles are involved before a sales transaction may be released (create a Sales Order, create a Prepayment Invoice and match a customers' payment with the Prepayment Invoice, Release the Sales Order).

Before a Sales Order can be set to Released, the Status Management Status Pending P can be set. As prepayment is not required from all customers, the Status is optional (as opposed to the Mandatory toggle).

The Status Pending P is linked to the Sales Order status option 'Pending prepayment' referring to the status that is assigned automatically whenever a prepayment invoice is posted from the Sales Order.

When a Sales Order is created for a customer with prepayment, it is not possible to directly assign Status Management Status Released.

  1. On the Sales Order page, on the action bar, select Actions > Functions > Change Status Mgmt Status.
  2. Select the required No.
  3. Select OK.

    A dialog box opens with a message that says there are unposted prepayment amounts on the document.
  4. Select OK.

    The user is forced to comply with the business rule imposed by the Prepayment functionality and first creates and posts a prepayment invoice from the Sales Order.
    When this is done, the status of the sales order is changed to Pending Prepayment.
  5. On the action bar, select Actions > Posting > Prepayment > Post Prepayment Invoice.

    A dialog box opens asking if you want to post the prepayments?
  6. Select Yes.

    The Status of the Sales Order now changes to Pending Prepayment.

    Now the Status Management Status Pending Prepayment can be assigned, as its setup matches the current status of the Sales Order. It is the user's responsibility to make sure the Status and the Status Management Status are aligned in this way:
  7. On the action bar, select Actions > Functions > Change Status Mgmt Status.
  8. Select the required option.
  9. Select OK.

    The Status Description now changes to Pending Prepayment.

    Once the payment is received from the customer and matched by the finance department, the status of the Sales Order can be changed. By selecting Status Management Status Released, both the Status fields are updated simultaneously.
  10. On the action bar, select Actions > Functions > Change Status Mgmt Status.
  11. Select the required option.
  12. Select OK.

The status changes to Released.

Incorporate approval into status management flows

Assume that the Standard Business Central workflow is activated that forces users to first send approval requests before being able to release a Purchase Order. This implies that multiple activities and roles are involved before a purchase transaction may be released (create a Purchase Order, send an approval request, approve or decline the request, release the Purchase Order). To support this way of working via the Status Management extension, the following Status Management Flow is designed:

Before a Purchase order can be set to released, the Status Pending A can be set. As in some cases, no approval is required (because the threshold value setup is not reached), the Status is optional (as opposed to the Mandatory toggle).

The Status Pending A is linked to the Purchase Order status option 'Pending Approval' referring to the status that is assigned automatically whenever an approval request is sent from the Purchase Order.

When a Purchase Order is created it is not possible to directly assign the Status Management Status 'Released' due to activation of a Workflow.

  1. On the Purchase Order page, on the action bar, Select Actions > Functions > Change Status Mgmt Status.
  2. Select the required option
  3. Select OK.

    A dialog box opens displaying the following message: This document can only be released when the approval process is complete.
  4. Select OK.

    The user is forced to comply with the business rule imposed by the Approval / Workflow functionality and first creates an approval request from the Purchase Order.

    When this is done, the status of the Purchase Order is changed to Pending Approval.
  5. On the action bar, select Request Approval > Send Approval Request.

    The Status now changes to Pending Approval.

    Now the Status Management Status Pending A can be assigned, as its setup matches the current Status of the Purchase Order. It is the user's responsibility to make sure the Status and the Status Management Status are aligned in a way that the status Pending Approval matches the correct Status Management Status.
  6. On the action bar, click Actions > Functions > Change Status Mgmt Status.
  7. Select the required option.
  8. Select OK.

The Status Management Status Description now changes to Pending Approval.

Once the transaction has been approved, the status of the Purchase Order is changed automatically into Released.

Now the Status Management Status can be changed to Released as well. It is the users' responsibility to make sure the Status (Value on Record) for Pending Approval and Released are aligned with the Status Management Status.