Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

WARNING: If you perform numerous list updates in a single step, be sure to check the “Clear Table Field Before Request” option. This will ensure data from a previous request in the flow is not included with list data from the current request.

Creating Invoices

Purchase Invoices (AP Invoices) are a common transaction from GlobalCapture to Business Central. Creating a purchase invoice may take many forms and might involve multiple steps, depending on the needs of the customer.

Steps - Header Only

If you wish to push only invoice header data:

  1. Ensure the document in GlobalCapture has been reviewed and include all required data points that match expected input for Business Central.

    1. In most cases, at a minimum, a vendor will be specified in GlobalCapture. To push an invoice and assign its vendor, you will need the vendor’s ID as data available in the GlobalCapture process.

    2. Use lists to ensure data in GlobalCapture matches the expected data points in Business Central.

  2. Use the Dynamics 365 node to target the purchaseinvoices endpoint in Business Central.

    1. When a Purchase Invoice is created, it’s internal ID will be returned in the response from Business Central. That ID will be automatically mapped to a process field named id if one is present in the workflow. This ID will be necessary for other actions you may wish to make on the invoice.

Steps - Header and Amount

If you wish new Purchase Invoices to include amounts, especially for expense based invoices, it’s common to pass a single line to the transaction.

  1. Follow the Header Only steps outlined above.

  2. Use the Dynamics 365 node to target the purchaseinvoicelines endpoint in Business Central.

    1. Per the Business Central documentation, you will notice the lines request is tied to the purchaseinvoice request: purchaseInvoices({p_id})/purchaseInvoiceLines

    2. The “{p_id}” portion of the request outlined above is Square 9 notation, and will automatically inject the ID value of the invoice created in the Header Only section above.

    3. The request body may include an amount from the header fields, or from a line in a table field. Use Square 9 Notation to map the data points needed in Business Central.