web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Error: Cannot cancel lot reservation — Sales Line does not exist in BC

(6) ShareShare
ReportReport
Posted on by 4

Hi everyone,

I’m working with Dynamics 365 Business Central and have a situation where a specific lot shows as reserved, but when I try to use Cancel Reservation in the Reservation Entries page I receive the error:

 
 

“The Sales Line does not exist. Identification fields and values: Document Type=’1’, Document No.=’SO‑1310’, Line No.=’10000’”

 

Here’s what I know so far:

 

  •  

    The lot is reserved but cannot be used in a new sales order.


  •  

    The Reservation Status was changed to “Surplus” via configuration package and freed the availability list view, but the “reserved” indicator still shows in reports.


  •  

    The error points to a missing sales line, which suggests that either the original sales order was deleted or a link is broken.



  •  
 

My questions:

 

  1.  

    What is the safest way to fully clear or cancel this “orphaned” reservation entry without causing data integrity issues?


  2.  

    Has anyone encountered a scenario where manually deleting the record in the Reservation Entries table was required — and if so, what were the side‑effects or warnings you observed?


  3.  

    After cleanup, what steps or reconciliation processes do you recommend to ensure the system reports correctly and no residual inventory reservation remains?


     
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    5,048 on at
    Error: Cannot cancel lot reservation — Sales Line does not exist in BC
    Hello,
     
    Your error is caused by an orphaned reservation entry, a reservation still linked to a deleted sales line.
    Safest cleanup:
    Try canceling the reservation via the Reservation Entries page or rebuild it using the Item Tracking Lines page.
    If it can’t be cleared, a developer can safely remove the entry and then run Recalculate Item Availability and Adjust Cost – Item Entries to sync inventory.
     
    Regards,
    Oussama Sabbouh
  • Suggested answer
    Gregory Mavrogeorgis Profile Picture
    763 on at
    Error: Cannot cancel lot reservation — Sales Line does not exist in BC
    Hi,
     
    Safest fix (preferred):
    1. Find the Entry No. for the orphaned lot in Reservation Entries (T337).
    2. Run a one-off AL routine that calls the standard engine to remove the pair:
      • Reservation Engine Mgt. → CloseReservEntry(ReservEntry, false, true)
      • or Reservation Management → DeleteReservEntries(true, 0 [, ReservEntry])
        (This cleans both sides and keeps integrity.)
    Last resort (no code):
    1. Backup / do it in a sandbox.
    2. In Table 337, filter by Item + Lot (and the old SO if present).
    3. Delete the pair with the same Entry No.: the Positive=No (demand) and Positive=Yes (supply).
    Never delete just one side.
    After cleanup (reconcile & prove it):
    1. Run Planning Worksheet → Calculate Regenerative Plan for the item.
    2. Confirm no 337 rows remain for that lot/Entry No.; no one-sided leftovers.
    3. Check Item Availability by Lot (reserved flag gone).
    4. (Optional) Run Sales Reservation Availability (Report 209).
    5. Functional test: create a new SO for that lot and reserve—should work.
     
    Hi if you found this helpful please mark it as verified
     
  • Suggested answer
    Teagen Boll Profile Picture
    663 on at
    Error: Cannot cancel lot reservation — Sales Line does not exist in BC
    The previous responses are correct but i'd also recommend using something like the free Table Data Editor app - Table Data Editor for Business Central
     
    You can use that app to then look at the reservation entry table and see if there are orphaned records. I have had to delete reservation entries before and used this app for it previously. You'll need to make sure you check the tables others have mentioned (Reservation Entry, Item Tracking Lines and Sales Lines). While I would be cautious deleting anything with that app, you can delete the reservation entry with it and this would be the same as if a developer were to go in and delete it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,421

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,878 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,645 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans