/
/
Correct an open Business Central purchase document safely
For operations teams who need to change dates, references or lines on an open purchase document, by asking their AI assistant.
On this page
Connector
Connect Microsoft Dynamics 365 Business Central, pick your AI tool and paste the prompt.
The problem
One wrong edit on a purchase document causes real trouble
Changing a date, reference or line on an open purchase order, invoice or credit memo means finding the document, checking it is still open and editing the right line. Lower a quantity below what was received, or touch a posted invoice, and you create problems.
Without PopdockAI
- Search for the document and check its status
- Scroll the lines to find the one to change
- Lower a quantity below what was received
- Edit fields you did not mean to touch
With PopdockAI
- Posted and released documents are refused with a reason
- Order quantities never drop below what was received
- You see a before and after table and confirm
- Only changed fields are written, then read back
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Apply `{changes}` to the open purchase document `{document-number}`.
Pass `{company}` as the company argument on every call. If `{company}` is empty, leave the company argument out so the connector's default company is used.
**Step 1: Find the document**
Call `business-central-get-purchase-transaction` with document-number set to `{document-number}`. If nothing comes back, call `business-central-get-posted-purchase-invoice` with invoice-number; if that matches, stop and explain that posted invoices are corrected with a credit memo (the request-vendor-credit-memo prompt). If status is not Open, stop: it must be reopened in Business Central first.
**Step 2: Lines and notes**
Call `business-central-get-purchase-transaction-line` with document-number; line-number is the sequence the update tools use. Call `business-central-get-purchase-transaction-comment` with document-number and show any comments, since they may explain the current values.
**Step 3: Plan the changes**
Pick tools by document-type:
* Order: `business-central-update-purchase-order`, `business-central-update-purchase-order-line`, `business-central-create-purchase-order-line`
* Invoice: `business-central-update-purchase-invoice`, `business-central-update-purchase-invoice-line`, `business-central-create-purchase-invoice-line`
* Credit memo: `business-central-update-purchase-credit-memo`, `business-central-update-purchase-credit-memo-line`, `business-central-create-purchase-credit-memo-line`
On an order line, never lower quantity below quantity-received.
**Step 4: Preview and confirm**
Show a before-and-after table. Ask for confirmation.
**Step 5: Apply**
After confirmation call each update once, headers with number, lines with document-number and sequence, passing only the fields that change.
**Step 6: Confirm the result**
Re-read with `business-central-get-purchase-transaction` and `business-central-get-purchase-transaction-line`.
**Rules & Guidelines:**
* Do not call any create or update tool until the user has confirmed the exact values shown in the preview.
* There is no delete tool. To drop a line, set its quantity to 0 and say so.
**Validation:**
* If `{changes}` does not say which line it means, list the lines and ask.Who it's for
One answer, three teams that use it
Purchasing agents
Update orders when suppliers change plans
Change dates and quantities on an open purchase order in one message, with received quantities protected.
On Business Central purchase order PO-2087, move the expected receipt date to December 3 and cut the Camp Stove quantity to 25.
Accounts payable
Fix references on open invoices safely
Correct a vendor invoice number or date on an open purchase invoice, and get a clear stop if it is already posted.
Change the vendor invoice number on open purchase invoice PI-1103 in Business Central to FAB-7781.
Operations managers
Drop lines without losing the history
Lines you no longer need are set to zero quantity with a note, so the document still shows what changed and why.
Remove the Trail Bottle line from purchase order PO-2090 in Business Central and note that Contoso discontinued it.
How it works
What PopdockAI does when you ask
You name the document and describe the changes, and your AI assistant finds it and plans the edit. Nothing is written until you have seen the before and after and said yes.
01
Ask
You name the document and describe the changes.
02
Check
It finds the open document, reads its lines and comments, and plans the changes.
03
Confirm
You see a before and after table and say yes.
04
Apply
It writes only the changed fields and reads the document back.
The outcome
Purchase corrections made to the right line
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
