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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

"Lot ID Not Specified" Error when Invoicing a Return

(0) ShareShare
ReportReport
Posted on by

Hello!

I'm running into an issue where several of our returns are unable to be invoiced resulting in the following error:

LotIdError.PNG

I've checked the Lot ID field on that item and all other items on this sales order to ensure it's not blank. It's not. The Return Lot ID field is also filled in on each item. I don't understand why I'm getting this error message if the field IS specified? Has anyone else encountered this problem?

*This post is locked for comments

I have the same question (0)
  • Brandon Wiese Profile Picture
    17,788 on at

    Can you get someone with System administrator access to reproduce the error, and then they can double click on the Lot ID not specified error message and give us the call stack that generates that error?  Knowing where in the source code it occurs would be tremendously helpful here.

  • Community Member Profile Picture
    on at

    Thanks for the reply! I do have System Administrator access. I saw in a similar thread in the past, you had recommended for someone to try this, however when I double-click the error message it does not provide me any additional information.

  • Brandon Wiese Profile Picture
    17,788 on at

    That is odd.   Try turning off CIL, under Tools, Options, Development, and un-check the Execute business operations in CIL, and try again.

  • Brandon Wiese Profile Picture
    17,788 on at

    That error message only has one label, @SYS26177.  Perhaps I can search the source for that label, and that will tell us where the error occurs, and maybe that will tell us something about why.

  • Community Member Profile Picture
    on at

    Unchecking that box did the trick! You are correct on the label. It's coming from the InventTrans table insert method code it seems.

  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 on at

    I found it.  It appears to only occur in one place, table InventTrans method insert().

        if (!this.InventTransOrigin)
        {
            throw error("@SYS26177");
        }

    That suggests you may have InventTrans records related to that sales order with no InventTransOrigin value.

    Run this SQL against your database.  Schedule a time where it doesn't interfere with operations if you have a massive amount of data in this table, so as to not adversely impact performance of the system.

    SELECT *
      FROM INVENTTRANS t (NOLOCK)
      WHERE t.INVENTTRANSORIGIN = 0

    There should be NO records with InventTransOrigin of 0 in AX.

  • Brandon Wiese Profile Picture
    17,788 on at

    Alternately, you could have a customization to the system that is trying to create InventTrans records with an InventTransOrigin of 0.  Another approach might be to put a breakpoint on that throw error line and then reproduce the error, with CIL turned off of course.  Then the call stack would tell us what calling classes lead you there.

  • Brandon Wiese Profile Picture
    17,788 on at

    Do you have a call stack for the error?

  • Community Member Profile Picture
    on at

    Thanks so much for this info! I will try out these suggestions and let you know how it goes.

  • Community Member Profile Picture
    on at

    I had some trouble debugging this process last night, but I did run this SQL query. I found 2 entries where INVENTTRANSORIGIN is 0, but they aren't related to the orders we're having problems invoicing. Definitely could still be causing the overarching problem, but I guess I'm not sure what to do from here to find out.

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans