Number Sequence in ax 2012

Hi all,

I have a requirment that i need to Generate a number Sequence based on FISCAL calender’s.

like if Fiscal calender is on 2012 then My number seq should generate 0001_2012,0002_2012

Fiscal calender is on 2013 then My number seq should generate 0001_2013,0002_2013.

Can any one help me out how to achieve this.

Thanks in Advance …

You can create 2 number sequence each for one year and before assigning the number sequence add check on date.

For test check the following code of job:

static void numSeqTest(Args _args)

{

NumberSeq num;

;

num = NumberSeq::newGetNumFromCode(‘VinTest12’);

info(strFmt("%1",num.num())) ;

num = NumberSeq::newGetNumFromCode(‘VinTest13’);

info(strFmt("%1",num.num())) ;

}

Result:

you can create number seq as follows:

You need to create two number sequences, use a scope that includes Financial calendar period and set scope parameters as appropriate for choosing the right number sequence.

Hi Vinit,

Thanks for the reply …but in my case I need the sequence based on FISCAL calender year,like this year mu number seq is like 2012_001,2012_002…etc.

but for the next calender year its should automatically changed to 2013_003,2013_004…etc

So even i used the fiscal calender in scope parameter’s ,i didn’t get the solution …

Hi Martin,

Thanks for the reply …

How we create 2 number sequences and attach as a single one…In Scope Parameter’s I selected Fiscal calender & I select the year as well… but in Segments I didn;t get the year …but even i can manual enter the year but when the fiscal calender changes to the next year how number sequence will change automatically…

My req is in the next financial year the system can automatically change the num seq to the next year with out user intervention…

Your Idea’a are highly Appreciated …

Thanks in Advance …

As I understand that, when year changes, it will stop to be in the scope of one sequence and will start to be in another sequence’s scope. Both number sequences must have a reference to the same data type (at Reference fast tab in Number sequences form).

Seems to be it is not possible without user intervention.

Then why MS has given the options of Legal entity and fiscal calendar period for number series ?

The answer is obvious - scopes indeed are supported. Give me a concrete example - how the number sequence for CustRoutingSlip_PSN table is used in AX2012 R2.

In CustRoutingSlipId.setCustRoutingSlipId(), the number sequence reference is obtain by calling CustParameters::numRefCustRoutingSlipId() (that will get the number sequence for current date, but you could pass a date to get a number sequence for another period). In numRefCustRoutingSlipId(), you can see how period is found from the date, NumberSeqScope is constructed and passed to NumberSeqReference::findReference(). NumberSeqReference is found for the combination of data type and number sequence scope, i.e. different number sequences will be returned for different fiscal periods.

Obviously, it requires that the number sequence reference is obtained by scope - if a static number sequence is used (e.g. the sequence ID is taken from a parameter), AX can’t magically start using another number sequence.

Hi Martin,

Thanks for the reply… I will give an example how the customer wanted number sequence based on year…

What the customer wanted over here is …:: he want to see the sequence based on the year so that he can easily identify the order on which year it got placed …So as per the sequence defied in the scope setup its should come the year in the number sequence…but Its not Coming …I am think is Its a bug…Y because of If u change the data in segment table then its coming as per the specified format… but when u define the year its not coming …

Thanks …

Hi Martin,

Martin ::: if a static number sequence is used (e.g. the sequence ID is taken from a parameter), AX can’t magically start using another number sequence.

But is there any possibility based on fiscal calender defined in the ledger can’t we reflect in the scope for the number sequence in ax 2012 R2.

Still I didn’t Understand the functionality of AX 2012 R2 Number sequence for the scope :Fiscal Calender & Legal Entity…

can any body help me on this …

Thanks in Advance.

Hi All,

From where I need to Ask support from the Microsoft for this Functionality of Fiscal Calender’s in Number Sequence in ax 2012 R2

You need to login to MS Dynamics Partner source , to raise the issue . Remember this is not free service from Microsoft.

Hi Guys,

Any Idea how to use this Company and Fiscal Calender Period & Legal Entity and Fiscal Calender Period in Number Sequence in ax 2012 R2.

Thanks in Advance…