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)

RecId Not generating sequentially (Ascending) in Table

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

  I have a table where recid's in it are not generated in sequence .

Ex : on date 23/12/2015 Highest recid coming as 5637155827

               24/12/2015  recid generating from 5637154768

Note : record in that table are being inserted through Batch job that makes use of bundling

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,443 User Group Leader on at

    RecId(s) are reserved for performance reasons and for caching purpose by system. so don't expect these to be in sequence always.

    its possible that the number which was generated yesterday to be greater than number which is being generated today. AX reserves bunch of number sequences.

    try to consider createdDateTime field for your business scenario or something else based on your requirement

  • Community Member Profile Picture
    on at

    Hi Sohaib,

    Thanks for quick response.....

    actually I notices that greater number recid coming on same days also ....

    in middle i.e

    if  record 10 has recid 19

                   11 has recid 17

                    12 has Recid 20

  • Sohaib Cheema Profile Picture
    49,443 User Group Leader on at

    yes this is possible. The is happening because of framework which keeps number sequences for caching and performance reason.

    Also, if multiple users are using ax at same time, it can leas to a situation where you get different recid than expectation.

    reconsider your logic on createdDateTime or by any other mechanism.

  • Luiz Ventura Profile Picture
    152 on at

    If you don't find the createdDateTime field in the table, you need to enable it in the table properties.

  • Suggested answer
    Community Member Profile Picture
    on at

    This is all standard and handled by Dynamics AX kernel..

    To achieve recid in sequence, you should specify RecId Index and have RecId index as cluster index.

    Please review and update us with your findings

  • Community Member Profile Picture
    on at

    Hi Nitesh/Sohaib

                           We noticed that Recid generated from Table SystemSequence , Value of  nextValue field in that table is populating as recid  in our table while inserting.

    Now I have a question is systemSequence depends on DataAreaid ,because all data present in that table only belongs to DAT company in my working  envirnoment.

    My company is other then DAT .

    So while working in other company let's say ABC

    Recid Coming other that next value from SystemSequence.

    If we are working in DAT

    Then Recid coming as same what we can see in nextvalue in System sequence Table

  • Brandon Wiese Profile Picture
    17,788 on at

    It will always say DAT in the table SystemSequences.  Since AX version 4.0 the RecId field is unique across all companies within a given table.  In earlier versions of AX (3.0 and earlier) each company had its own RecId sequence for a given table.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans