Number seq is skipping how to control in Ax 2012 R3

Hi ,

I created a number sequence in the form using numberSeq class in ax 2012 r3.

It is creating number sequence perfectly.

But the problem raised after deleting the record without saving the record.i.e., pressing the Esc Key.

After that creating a new record generates new number rather than the deleted number.

Eg :1. CTRL+N => record "001" is created

      2. Delete "001" without saving using (Esc key).

     3. CTRL+N => record "002" is created

    4. But I want to generate 001 only.

 

Below is the code for generating

numSeqCode = EcoResCategory::find(recid).USMFNumberSequenceCode;
num = NumberSeq::newGetNumFromCode(numSeqCode); // Parameters Table
itemid = num.num();

 

Please help me!!!

Thanks in advance

Related
Recommended