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 :
Microsoft Dynamics AX (Archived)

Error: "Lot ID is not specified" while Cancel Sales Order

(0) ShareShare
ReportReport
Posted on by 110

Error: "Lot ID is not specified" while Cancel Sales Order

 

Sales-Cancel-Error.jpg

*This post is locked for comments

I have the same question (0)
  • Brandon Wiese Profile Picture
    17,788 on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    That suggests to me that one (or more) of the Sales order line records (table SalesLine) may be missing an Inventory Lot ID (field InventTransId), which is odd.

    Can you inspect each of the Sales order lines on that order, by expanding the Line details, then looking for the Lot ID found under the Inventory field group on the Setup fast tab?

    Also, can you double click on that error message, and respond back with precisely the code that is responsible for throwing that error message?

  • AreezUddin Profile Picture
    110 on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    Lot ID already available under the Inventory field group on the Setup fast tab

    Sales-Cancel-Error-1.jpg

  • AreezUddin Profile Picture
    110 on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    Error

  • Brandon Wiese Profile Picture
    17,788 on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    Thanks for the excellent response.

    Did you check all of the Sales order lines to make sure they all had a Lot ID?

    If so, please go back over all of the Sales order lines, and click the Inventory button on the lines action bar, then Transactions.  For each line, you should see an inventory transaction of status On order, Reserved ordered, or Reserved physical, for the same quantity that is still physically remaining on that Sales order line.

  • AreezUddin Profile Picture
    110 on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    Inventory transactions not available.

    Sales-Cancel-Error-2.jpg

  • Brandon Wiese Profile Picture
    17,788 on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    As suspected, good.

    If you right click on the Item number, View detail, then open Inventory transactions from there, can you see the On order, Reserved ordered, or Reserved physical transaction for that order there?  Usually it will be at or near the top of the grid.

  • Brandon Wiese Profile Picture
    17,788 on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    I suspect that you have some database corruption, in that either an InventTransOrigin record is missing, or an InventTransOriginSalesLine is missing.  I've seen both before.

    Note that this post is for academic and educational purposes only.  You should never tamper with your production system on the advice of random people on the Internet, even when it seems on the surface to be harmless or helpful.  Make sure you have backups and a functional recovery strategy, and test everything first thoroughly on a non-production system first.

    You can check for missing InventTransOrigin records with the following SQL.  Ideally the results of this query should be no records (empty).

    SELECT *
      FROM INVENTTRANS t
      WHERE NOT EXISTS (
      
        SELECT 1 
          FROM INVENTTRANSORIGIN x 
          WHERE x.[PARTITION] = t.[PARTITION] 
            AND x.DATAAREAID  = t.DATAAREAID 
            AND x.RECID = t.INVENTTRANSORIGIN
            
      )
    


  • Community Member Profile Picture
    on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    Hi Areez/Brandon,

    I'm experiencing this same error and found out the same result- No inventory transactions in some Sales Order lines. May I know if you were able to resolve this issue & what are the steps that you did? thanks in advance.

    Bella

  • Sagar Suman Profile Picture
    6,544 Super User 2025 Season 2 on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    HI All,

    I suspect this to be Return Lot ID issue not lot id alone.

  • Community Member Profile Picture
    on at
    RE: Error: "Lot ID is not specified" while Cancel Sales Order

    Hi Sagar,

    Thank you for your response. I will look into this also but for some scenarios that I've checked, the SO items are still unserved (should be on order). Hence, they don't have invoiced transaction to apply the Returned Order into.

    Thanks.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Willem van Duren Profile Picture

Willem van Duren 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans