Bojensen Blogs

Code to generate NumberSequence numbers

 Axapta uses following classes for generating numbers against numberseq code.

1.NumberSeq class–> Main class which will generate,assigns numbers and vouchers for references.

2.NumberSeqReference–> Used to find the reference.

static void numberSeq_Demo(Args _args)

NumberSeq numberSeq;
numberSeq = numberSeq::newGetNum

How it works

1.NumberSeq Table act as master table for numberseq code , which stores
format to be generated , next sequence etc.

2.NumberSequenceReferences stores all the references and their corresponding numberseq codes.

3.As shown in the above code , NumberSeq class needs numberseqreference ,
i,e “EDT. Unique Id for the Process ” So first get the references by
passing an EDT as parameter to the findReference method of numberseqreference  class.Than you can call numberSeq.num() method to generate the number for you.

4.Use NumberSeqFormHandler class if you want to use the numbersequencs on form.

Learn Dynamics Ax: X++ NumberSequence Code to generate numbers

Comments are closed.