Is there a fast way to unlock number sequences?

Hi all,

right now I ve got the task to unlock number sequences in “Organization Administration” > Number sequences > Number sequences". I remove the checkmark in yes/no field “stopped” manually. So far so good, but I need to do this for 190.000 number sequences. Unlocking them one by one would take ages. So is there a faster way to unlock the number sequences, e.g. a job that can help mit to archive my task faster ??

Any help would be most welcome !


I’m not your man for helping with a job, but you could go to the Number Sequence Table and the field ‘Blocked’ is the equivalent of the field Stopped. There you could press down on your keyboard and space to untick or tick them all pretty quickly.

Then to double check if you’ve missed any, press CTRL G to turn on your filter and filter by yes if you want to see what’s still to be unticked, and no if you want to see what’s still to be ticked. I think this would be just as quick, take around 5/10mins.

Hope this helps.


yes I mean stopped and you saved my day ! Now I go and face palm myself several times, because I didnt thought about this… Thanks for your help !!!

Maybe I dont need to face palm myself… .I am on the list page “Organization Administration” > Number sequences > Number sequences" i ve personalized the field “stopped”. The field is visible/editable but I cant remove the checkmark in the field “stopped” by using the space bar… arrghh… still 19000 number sequences where I need to remove the checkmark from the field “stopped” … Any other ideas, so I dont have to spend the whole weekend doing this ?

Unfortunately you forgot to attach the tag without your version of AX, so I don’t know which options are available to you.

If you don’t mind writing a piece of code, either in X++ in or SQL, it will be pretty easy. Without coding, you could use DIXF, for example.

By the way, how did you get into this situation and why do you have 19000 number sequences?

Hi Martin,

I use to work with AX 2012 R3 . I would prefer a solution without coding, cause I am not very good in coding. Can you explain DIFX to me…

Please dont ask how I got into this… Actually it wasnt my fault, I am just the guy that has to fix this… somehow… :wink:

If you’re all right with executing code, we can help you to write it. It may be as simple as this:

NumberSequenceTable seq;
update_recordset seq
    setting Blocked = NoYes::No;

But be careful before running it - it updates all sequences in all companies and I’m not sure if you don’t want to exclude some records.

The idea about DIXF is that you would export all records using the Number sequence code entity. You would include only mandatory fields and Blocked; we’re not interested in other fields. You would change the value of Blocked in the file and upload the data back.

My opinion is that a piece of code is the most efficient solution in this case.

Hi Martin,

i am all right with executing code. I would first try it in “my” Contoso demo system the other way around (setting stopped from No to Yes, cause in Contoso there are no stopped number sequences). As far as I understood I would have to change line 3 to “setting Blocked = NoYes::Yes,” to stop all number sequences in Contoso , right ?

Correct. Line 3 says “set value X to field Blocked”. The field is based on an enumerated type called NoYes, which - obviously - have two values: No and Yes. If you want to refer to these values, you use the name of the type (NoYes), followed by :: and then by the value (Yes or No).

By the way, if you find performance unsatisfactory, try calling seq.skipDataMethods(true); before update_recordset.

Okay… as I said before I am not very good in coding so I have to ask a noob question… Where do I have to enter the code ?? Dont be afraid in case something goes wrong, I will just have to setup the demo system again…

The easiest way is to create a job. Press Ctrl+D in AX to open the AOT, right-click the Jobs node and choose New Job.

So i have open the AOT, created a New Job and entered the following code:

NumberSequenceTable seq;
update_recordSet Sequence
setting Blocked = NoYes::No;

Then i pressed “GO” and the following Stop Error appears:

Error executing code: (object) has no valid runable code in method seq. Stack trace (C)\Jobs\seq

It should be update_recordSet seq, not update_recordSet Sequence. You have no variable named “Sequence”.

Okay… I ve just copy&paste the code sequence.
It looks like this:
NumberSequenceTable seq;
update_recordset seq
setting Blocked = NoYes::No;

I still got the Stop Error, when pressing Go

Before trying to run your code, compile it first. if there is an error, the compiler will tell you what’s wrong (more or less) and where it is. It compiles fine in my system.

Sorry for letting you wait, I had to leave the office before they turn on the alarm… OK… I will try when I am at home. Should it not work, maybe we should consider the Import/Export function…

Hey guys, I’m moving this to the developer forum as we’re now talking about writing and executing jobs.

Hi all,

please close this one. I made it, thanks to some coding. I would like to thank all that helped me out on this topic and show me the right direction how to solve this problem !