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)

Set sequence number to generate random numbers

(0) ShareShare
ReportReport
Posted on by

I am looking to generate a non-continuous random number sequence for Appointment ID's in the Transportation Management module. It is important that the numbers are non-sequential. 

I have set the preallocation to 10 numbers, however after doing some more research, it looks like this will only generate a non-continuous sequence if my user logs out and then opens a new session (where a new preallocation would take place). My user will not be logging out when entering multiple appointments in a row, and I am looking for those appointment numbers to be non-sequential. It is important that they skip around so the drivers using these appointment numbers can't guess what the next number will be. Is there a parameter that I can set to do this or will this require a custom enhancement? 

Thanks! 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nunomaia Profile Picture
    25 Moderator on at

    Number sequences allocation are stored at the client session level, that reason to get a range of preallocation for each time you logon.

    The only way to get a truly random number sequence is by customization.

  • Anjaney Profile Picture
    424 on at

    HI ColeCW, Hope u r doing well.

    If you just want non sequential number sequence (Random number seq.) then just go to Organization administration >>common >> Number sequence  then open that number seq. which you have setup for your purpose and then click on Edit button.

    There you will find a General Fast tab ... Just uncheck the continuous check box ...

    This will probably solve ur issue.. If I got your problem correct

    Thanks  

  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Cole,

    Like Nuno mentioned, you need to customize it. I doubt if it is recommended to build such a feature as you need to or pre-fetch possible numbers and have a status on it. At least you have to take of preventing generating duplicate numbers.

    Can you also tell more about the current problem when drivers will guess the next number? I like to understand more about this problem.

  • Community Member Profile Picture
    on at

    Hi Andre, thanks for your response. I can explain the problem a bit more for you:

    The manufacturing facility assigns vendor delivery drivers appointment numbers so they can schedule when raw materials will arrive at the facility. The vendors often have the material ready for shipment before the appointment they have been given, so they try to deliver the goods early. If the appointment numbers are sequential, the drivers could guess what the next upcoming appointment is and then claim that that is the appointment number they have been given so that they can get their goods delivered earlier. If we randomize the appointment numbers, we can prevent them from guessing the next appointment number and make sure they use the appointment they have been given.

  • Community Member Profile Picture
    on at

    Thank you Nuno for your response!

    Does that mean that in order to get numbers in a new preallocation sequence, the user needs to close and reopen their AX session? I am trying to understand what you mean by "at the client session level"

  • nunomaia Profile Picture
    25 Moderator on at

    Client A, use a sequence number with pre allocation enabled, Client A automatically will reserve sequence numbers in the session. This will increase performance because isn’t required to query the database to get a new sequence number.

    If you close client, you will lose the reserved numbers since they were in memory. The reason to have gaps in sequences with pre-allocation enabled.  

  • nunomaia Profile Picture
    25 Moderator on at

    I will propose a simpler solution instead of a random sequence number.  Add a new field associated to the appointment number, this new field will be a unique random number, for example a GUID. When your print the appointment, print the random number instead of appointment number . This way, you don’t have to change the core functionally of AX and you can search it.

  • fatihgork Profile Picture
    3,817 on at

    I hope Microsoft will develop such a feature because, also a number sequence is used for generating credit notes at Retail POS. This makes credit note numbers very easy to guess and abuse.

  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Fatih,

    I do think accountants don't like your comment about credit note numbers. There are regulations to have this sequential.

  • fatihgork Profile Picture
    3,817 on at

    Hello André,

    Since we do not have this regulation in my home country: I did not think that way.

    Thanks for the information, now I see.

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