AX2012R2 Number sequence problem

Hi All,

I installed AX2012R2 successfully.But i create a new purchase order the number sequence starts 000000 i changed format again it starts PO-000000 i checked other modules also i get the same error.

Please tell me how can i solve this problem?

Regards,

MSDAX

hi MSDAX ,

Hope this code might be helpful to u for creating an number sequence number for your po. I have tried this and it worked for me.

Regards ,

Himanshu

Steps to create Sequence number in Ax

Step 1 :

Create an EDT - String Type

So, I created an EDT named “AXSeqEDT” with label “AX Seq”

Step 2 :

Drag new created AXSeqEDT sequence number into our table Fields.

Step 3 :

Now create a new Number Sequence

Path for creating num Sequence is

“Module:: Organization administration…Common…Number sequences…Number sequences”

Click on New(Number Sequence)

Now number Sequence form will be opened----That contains 4 sections.

· Section 1.Identification…Specify the NumberSeqCode and Name

· Section 2.Scope Parameters… Select the Scope from the Dropdown

· Section 3.Segments… Add the constant and alphanumeric

(by clicking the add button and selecting from drop down)

Or just don’t change anything if generating an error and go to next step

· Section 4 .General…Checkmark for continuous and Specify the “smallest and largest and Next” Fields

Now Save Ur Settings

Step 4 :

Now go to AOT—Classes-NumberSeqModuleHRM—loadModule()

The Added Code is::

datatype.parmDatatypeId(extendedtypenum(AXSeqEDT));

datatype.parmReferenceHelp(literalstr("@SYS32633"));

datatype.parmWizardIsContinuous(true);

datatype.parmWizardIsManual(NoYes::No);

datatype.parmWizardIsChangeDownAllowed(NoYes::No);

datatype.parmWizardIsChangeUpAllowed(NoYes::No);

datatype.parmWizardHighest(99999);

datatype.parmSortField(12);

this.create(datatype);

Step 5:

Now Goto AOT—Tables—HRMParameters—methods-----click on new method

The Added Code is

static client server NumberSequenceReference numRefAXSeqEDT()

{

return NumberSeqReference::findReference(extendedTypeNum(AXSeqEDT));

}

Step 6 :

In order to add our newly created number sequence reference to our Module write the following Job and Execute it

Below job is important to run because without it your new number sequence will not be available to number sequence form under Parameters. This is the change in behavior from AX 2009 where all new number sequence loads while restarting the Dynamic AX. In AX 2012 all the number sequence created to system while installation, so restarting the AOS wont effect in loading the new number sequence, that is why it is important to run the job to load new number sequences.

The Code added in The Job is

static void jobName(Args _args)

{

NumberSeqModuleHRM NumberSeqModuleHRM = new NumberSeqModuleHRM();

;

NumberSeqModuleHRm.load();

}

Step 7 : (Not imp Step to follow)

After executing the Above Job, our newly created number Sequence reference “AX Seq” will be added to HRM Module----Number sequence setup form

If you go to Organization administration…Common…Number sequences…Number sequences"

And find your sequence number and click on Generate. You will c that your sequence number AxSeq is listed.

Step 8 :

Go to Design and select an String control and give the data source name and set data field name as extended data type field name which was drag and drop into table.

Select Button Control and wrote the Step 9 code into button Clicked Event

Step 9 :

write this code on button click event to generate Sequence number on click of button

public void create(boolean _append = false)

{

;

super(_append);

FirstTable.AXSeqEDT = NumberSeq::newGetNum(HRMParameters::numRefAXSeqEDT(),true).num();

}

Step 10 :

Now save all your settings…Now Open our form or run the form and click on button to create or generate automatic number sequence

Alter the next number field to get the next number you require in the format you require.

Dear AdamRoue and Himanshu,

I don’t have any problem with my customized numberseq it working perfectly. my problem with base numbersequency only. suppose if i create new purchase order it po number is 00000 or if i create GeneralJournal the journal num shows CEU-000000 etc

I change next number in the to that particular numberseq code in the organization module but it shows again 00000

All base numberseq starts with 00000 only.

Please share the ideas about this.

Thanks in Advance.

Please post a screen shot of the edited number sequence (pick any one generating 00000) showing the segment and general fast tabs expanded. Like this.

Hi AdamRoue,

Thanks for given replay .I share my screen shot

5850.GL.png

.

Mine works replicating your setup, what version are you on? Can you get a developer to look at it? Can you remove the number sequence, delete it, recreate it and reapply it to the Journal Batch Number for the company?

Hi AdamRoue,

Thanks for supporting this issue.

I tried as you said.i delete the existing number sequence and i create a new one but in the reference tab i add area and coming to reference lookup shows empty.see the below screen.0434.ref.png

You need to go to the parameter - the lookup (I believe) only shows unassigned references. Go to the general ledger parameters, reset the Journal Number reference.

Hi AdamRoue,

In general ledger parameters the allocated number sequence journal number is not in use. i click generate but again it starts with CEU_000000

2068.gp.png

1070.num.png

Hi,

Did you able to solve this issue, I am also getting the same after In-place upgrade.

Regards

Shacki

Hi,

It is due to the continues check mark, if you remove it, will work. but it is strange.

Regards

Shacki

Hi Himanshu,

Exelent Explanation related to NumberSequence, but Here I have a diffrent Requirment …

i.e I need a number Sequence based on Fiscal Calender…From Code or from Any setup How can I achieve this …

Thanks in Advance …

came accross the same problem, seems to be a bug to me… disabling the continues check box is not an option for us; there may not be any missing numbers in for instance general ledger. Changed following bold code to solve the problem:

class NumberSeq / method getNumInternal:

if (ok)

{

nextRecord = this.getNumFromList(userConnection,numberSequenceTable);

if (nextRecord == #NextRecordNull)

{

if (numberSequenceTable.NextRec == 0 || numberSequenceTable.NextRec > numberSequenceTable.Highest)

{

ok = checkFailed(strFmt("@SYS17478",numberSequenceTable.NumberSequence));

}

else

{

// if (!numberSequenceTable.Continuous)

if (!numberSequenceTable.Continuous || nextRecord == #NextRecordNull)

{

nextRecord = this.getNumFromTable(userConnection,numberSequenceTable);

}

}

}

regards,

Peter

The issue is most likely caused by a missing stored procedure called ''getNumInternal" on the SQL server AX database.

3113.getNumInternal.JPG

Rgds,

Paul