Number Sequence in ax 2009

Hi All,

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

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

  1. Delete “001” without saving using (Esc key).

  2. CTRL+N => record “002” is created

  3. But I want to generate 001 only.

How can i achieve this, please provide a solution.

Note: I set the “continues” flag on the number sequence.

Thanks in Advance.

Call numberSeqFormHandler.formMethodClose(); in the close method of form before super(), which release the unsaved number when form is closed.

Reference \Forms\BOMTable\Methods\close

Hello Kranthi,

Excellent, my problem solved.

Thank you so much.

Thanks Kranti,

But the form where I need to apply the number sequence for my field is an static form i.,e without any datasource… so how would I apply Numbersequence framework there…