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
Delete “001” without saving using (Esc key).
CTRL+N => record “002” is created
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
kranthi
February 22, 2018, 6:34am
2
Have you tried by setting it to continuous?
Hi Rajendra. You have to create methods at form level. Follow below blog
www.dynamics101.com/…/
Also keep continuos as said Kranthi
Yes I tried but I’m getting an error like Number seq cannot be continous
kranthi
February 22, 2018, 6:44am
5
I think you are not allowing the continuous option on your NumberSeqModule* class.
datatype.parmWizardIsContinuous(true);
Check the status list of that Number sequence…
This may helpful to you …
I have checked with continous option still New number seq is coming
kranthi
February 22, 2018, 11:51am
8
What other code do you have on the form related to this number sequence?
You may probably need to call the num.abort(); in form close and form data source delete methods - if the record is not created.