Open Forum

Add Purchase Order Lines using Flow Business Central Connector

  • 1.  Add Purchase Order Lines using Flow Business Central Connector

    Posted 17 days ago
    Hello all,

    Has anyone been able to create PO Lines in a Power Automate #Flow using the BC Connector (Preview)?

    Creating a PO (Header) in the workflowPurchaseDocuments table works fine, but creating a PO Line in the workflowPurchaseDocumentLines table always fails with the following error:

    ErrorCode: Application_FieldValidationException  Document No. must have a value in Purchase Line: Document Type=Quote, Document No.=, Line No.=0. It cannot be zero or empty.

    However, the BC connector does not seem to expose a Document No. field that is required (in order to attach the PO Line to its proper PO Header). In contrast, the OData API provides a way to specify the Row Id of the PO Header when creating lines. This looks like an oversight in the BC connector and the public documentation from MS does not cover that level of details.

    Note: the same issue seem to exist with other similar entities such as Purchase Quote, Purchase Invoice, Sales Invoice and their corresponding lines, which cannot be created using the BC connector either. Refer to this post from several months ago for additional details:
    https://ruudvg.com/2019/05/26/microsoft-business-central-api-beta-create-a-sales-order-and-sales-order-lines-through-powerapps-flow/

    Thanks for sharing your experience!
    #D365BusinessCentral
    #Flow
    #Technical

    ------------------------------
    Alexandre Levis
    BDM Global
    ------------------------------
    Conference-BCNAVUG_200x200


If you've found this thread useful, dive deeper into User Group community content by role