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)

Inventory Movement -- Number sequence 0 does not exist.

(0) ShareShare
ReportReport
Posted on by

I have created AIF document service for creating Inventory Movement through visual studio. When tried to create Journal Lines, application throughs an error "Number sequence 0 does not exist". Here is my code to create Journal lines: -

DataTable dtModulaMovement = MovementData(DateTime.Parse( date));

            JournalMovementServices.CallContext context = new JournalMovementServices.CallContext();
            context.Company = "ABCD";
            context.MessageId = Guid.NewGuid().ToString();

            List<AxdEntity_InventJournalTrans1> transactions = new List<AxdEntity_InventJournalTrans1>();
            decimal line=0;

            AxdEntity_InventDim inventDim = new AxdEntity_InventDim()
            {
                WMSLocationId = "Default",
                InventSiteId = "Jeddah"
            };
            foreach (DataRow row in dtModulaMovement.Rows)
            {
                line++;
                AxdEntity_InventJournalTrans1 trans = new AxdEntity_InventJournalTrans1()
                {
                    JournalId = journalId,
                    ItemId = row["MOV_ARTICOLO"].ToString(),
                    TransDate = DateTime.Parse(row["MOV_TIME1"].ToString()),
                    LineNum = line,
                    LineNumSpecified = true,
                    InventDimId="ABCD-602295"

                };
                transactions.Add(trans);

                
            }
            AxdJournalLines lines = new AxdJournalLines();
            lines.InventJournalTrans = transactions.ToArray();

            JournalMovementServices.JournalLinesServiceClient linesClient = new JournalLinesServiceClient();
            var keys = linesClient.create(context, lines);


 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Amir Nazim Profile Picture
    5,994 on at

    check the number sequence is continuous for movement journal in inventory management module ?

  • Community Member Profile Picture
    on at

    Yes, I have checked it. It is continuous.

  • Suggested answer
    Amir Nazim Profile Picture
    5,994 on at

    JournalId = journalId,

    what is the value you setting here, you might want to remove this line and check,

    having continuous number sequence should pull the journal number value it self.

  • Community Member Profile Picture
    on at

    journalId = "IJ-0010881"

    This is the automatically generated journal number in InventJournalTable

  • Suggested answer
    Community Member Profile Picture
    on at

    Please Go to number sequence => Manual Clean up => All and after clean up, uncheck continuous check box and try to run the scenario. Please share results.

  • Community Member Profile Picture
    on at

    After manual clean up I am still getting the same error: "Number sequence 0 does not exist."

  • Suggested answer
    Community Member Profile Picture
    on at

    Did you uncheck the continuous check box ?

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,037 Super User 2025 Season 2 on at

    The error means that it did not find a Number sequence record to retrieve a number. It is not related to continous or clean up tasks.

    Did you spcify the journal type and/or the inventory journal name? The inventory journal name contains a field "voucher series". I think it cannot find the journal name or the voucher series field is empty. Then you get this error.

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