Error fixMicrosoft Dynamics 365 Business CentralInventory / Item Ledger

Business Central: "You have insufficient quantity of Item on inventory"

Error
You have insufficient quantity of Item on inventory Business Central

Also searched as

  • business central prevent negative inventory error
  • business central cannot post shipment insufficient quantity item
  • business central allow negative inventory item ledger

Short answer

Business Central raises this error when posting would take an item negative and Prevent Negative Inventory is switched on, either globally in Inventory Setup or on the item card. The usual root causes are a different location or variant than you expect, an earlier posting date, receipts not yet posted, or lot or serial numbers that are not available. Check the item ledger for the exact combination before changing the setting.

Applies to: Business Central online and on-premises, Dynamics NAV 2013 and later

How to find and fix the shortage

  1. 1Note the item number, location code and variant on the failing line. Inventory is checked per item, variant and location combination, not item total.
  2. 2Open the Item card, then Item Ledger Entries, and filter by that location and variant. Sum Remaining Quantity on open entries to see the real balance.
  3. 3Compare the posting date on the document to the dates of the inbound entries. Posting an issue dated before the receipt date can show as negative for that date.
  4. 4Look for receipts that exist as documents but are not posted: purchase receipts, production output, transfer receipts. Post them first if they are genuine.
  5. 5If the item is tracked, open Item Tracking Lines and confirm the lot or serial numbers you selected have remaining quantity at this location.
  6. 6Check warehouse setups. With Bin Mandatory on the location, quantity must exist in a bin the pick or shipment can use, otherwise you hit warehouse errors before or alongside this one.
  7. 7Check Inventory Setup and the item card for Prevent Negative Inventory. Change it only if the business accepts negative stock for this item, such as backflushed components.
  8. 8Repost after correcting the document, then run Adjust Cost - Item Entries if the correction changed costs.

Where the rule is defined

Prevent Negative Inventory exists in two places. In Inventory Setup it sets the default for every item. On the Item card (Replenishment or Posting fast tab depending on version) it can be set to Yes, No or Default, which lets you allow negative stock for a handful of items such as consumables or phantom-like components while keeping the global rule on.

When the rule applies, the posting codeunits check remaining quantity on the item ledger for the posting combination and stop the post if the result would be below zero. The check includes the variant and location on the line, which is why a quantity that looks fine on the item card total still fails: the stock is at MAIN and the line says EAST.

The check runs at posting, not when you enter the line, so a user can build a whole shipment and only meet the error on Post. Reservation and availability FactBoxes show a warning earlier, but they are advisory.

The usual hidden causes

Location mismatch is the top one. Sales lines default the location from the customer or the document header, and warehouse employees often receive into one location code and ship from another. Run Item Availability by Location from the item card to see all balances in one view.

Variant mismatch is second. An item with variants carries stock per variant, and a blank variant is a different bucket from variant RED. Lines created from copy-document functions or imports often lose the variant.

Date order is third. Business Central is applying inventory by posting date, so a shipment dated the 3rd cannot consume a receipt dated the 5th. This often appears right after month-end when receipts were posted late and shipments were posted on their true dates.

Finally, production consumption raises it too. A released production order posts consumption of components. If the component is short at the order's location, the consumption journal fails with the same message. Check the bin or location code on the production order component line.

On-premises SQL to see open balances by location and variant (replace CRONUS with your company):
SELECT [Location Code], [Variant Code], SUM([Remaining Quantity]) AS OnHand
FROM [CRONUS$Item Ledger Entry]
WHERE [Item No_] = '1000' AND [Open] = 1
GROUP BY [Location Code], [Variant Code]

When allowing negative inventory is reasonable

Some operations legitimately issue before they receive: backflushed raw materials where receipts are booked in a batch each shift, or items drawn on a consignment basis. Setting Prevent Negative Inventory to No on those items avoids blocking the floor, but it shifts the control to reporting.

If you allow it, build a daily check on negative remaining quantity so the shortage is caught and fixed. Costing also suffers: negative stock means cost is applied later when the receipt arrives, so values change after Adjust Cost runs, and financial reports can move retroactively.

For most finished goods and purchased items, leave the rule on. It is the only thing that forces a stock error to surface at the moment it happens.

Common pitfalls

  • !Looking only at the Inventory total on the item card instead of the location and variant balance the line actually needs.
  • !Turning off Prevent Negative Inventory globally to get one shipment out, then losing the control for every item.
  • !Posting a shipment dated before the receipt it depends on, which shows negative at the earlier date.
  • !Ignoring unposted receipts or production output that would satisfy the demand.
  • !Not running Adjust Cost after posting against negative stock, leaving cost values provisional.

How an ERP-grounded AI assistant handles this

This is a lookup problem across item ledger, location and variant, which is where a grounded assistant helps. Asked why a line is short, ERPray can query open item ledger entries for the exact item, location and variant, list unposted receipts and production output that would cover it, and show the SQL or API query it used. It is read-only, so any posting or setup change remains a user action.

Frequently asked questions

Why does the item card show stock but posting still fails?

The check is per item, variant and location. The item card shows an overall figure, but the line may name a different location or an empty variant. Open Item Availability by Location, or filter Item Ledger Entries on the line's location and variant, to see the balance that actually applies.

Where do I allow negative inventory in Business Central?

Use Inventory Setup for the company default and the Prevent Negative Inventory field on the Item card to override it per item. Setting it to No on the item lets that item go negative while the global rule stays on for everything else.

Does the posting date affect this error?

Yes. Business Central applies stock by posting date, so an issue dated before the matching receipt appears to have no stock on that date. Post the receipt with its true date, or move the shipment's posting date after the receipt, and the error clears.

Can this happen with production consumption?

Yes. Posting consumption from a released production order consumes component stock at the order's location. If the component is short there, or in the wrong bin, the consumption journal raises the same error. Fix the location on the component line or move stock first.

Related

Error fix

Business Central: "Posting Date is not within your range of allowed posting dates"

Business Central blocks the posting because the document's Posting Date falls outside the Allow Posting From / Allow Posting To window. The window is read from the user's own row in User Setup first, and from General Ledger Setup only when the user row is empty. Fix the date on the document, or widen the right window, or change your work date if the wrong default was applied.

Error fix

Business Central: "Select a Dimension Value Code for the Dimension Code"

Business Central stops the post because a Default Dimension for an account, customer, vendor or item has Value Posting set to Code Mandatory, and the document has no value for that dimension. Either supply the dimension value on the line or header, or change the Value Posting rule if the requirement is wrong. Dimension combinations and priorities can produce similar-looking blocks.

How-to

Calling and extending the Business Central API v2.0

The Business Central API v2.0 is a REST/OData endpoint at api.businesscentral.dynamics.com/v2.0/{tenant}/{environment}/api/v2.0, authenticated with Azure AD OAuth 2.0. It exposes standard entities like customers and items, and lets you publish your own with an AL API page.

Error fix

Fixing "Cannot create a record in (table). The record already exists" in D365 F&SCM data entity imports

This is the standard kernel duplicate-key exception, thrown when the Data Management Framework tries to insert a staging row into a target table whose unique or alternate key already matches an existing record. It almost always means the entity's insert-vs-update logic did not recognize the target row as an update, not that you have a true accidental duplicate in your source file.

Error fix

Fixing "There are currently no batch servers available for processing" in D365 F&SCM

This message means the batch framework cannot find any AOS instance flagged as a batch server and available for the batch group the job is assigned to. The fix is almost always in server configuration (System administration > Servers) or batch group assignment, not in the batch job itself.

Error fix

Fixing "You do not have the following permissions on TableData (table): (permission)" in Business Central AL

This runtime error means the current user's assigned permission sets do not grant the required Insert, Modify, Delete, Read, or Execute right on that specific table. It is most common right after installing or updating a custom AL extension, because Business Central checks object-level permissions even for tables an extension owns.

AI for ERP

AI for Business Central manufacturing operations, beyond Copilot

AI for Business Central manufacturing beyond Copilot: grounded answers on production orders, routings, and capacity via APIs v2.0, on-prem capable.

AI for ERP

AI for Dynamics 365 Business Central in Discrete Manufacturing

Grounded AI for Dynamics 365 Business Central discrete manufacturers: production orders, planning worksheets, routings and costing, on a private LLM.

Stuck on Microsoft Dynamics 365 Business Central?

Talk to engineers who work inside Microsoft Dynamics 365 Business Central every week, and who build private AI that answers these questions from your own ERP data.