x++


Number sequence issue Ax 2012?


I have created a New number sequence named 'MyNumberSeq' using Number sequence form under Organization administration Module in AX 2012.
Now, I am using this number sequence in a form in some static field let's say 'MyNumberseqField' in Form 'MyForm' that will save the record in a table after pressing save button.
If I am creating a new record, it is getting the number sequence in a specified field and data gets saved if I press Save button.
I am fetching number sequence as
MyNumberseqField.text(numberSeq::newGetNumFromCode("MyNumberSeq").num());
But My issue arises when I am closing this form by pressing cancel or by pressing Esc button(Let's say Number seq generated is MD-00001). Logically Number sequence which was generated should get free on this action.
The form closes as any normal form, Now if am opening this form again to create new record, New number seq (MD-00002) gets generated instead of previous unused number MD-00001.
Please suggest any solution for this or any other alternate way to create Number seq.
You have to tick the
Continuous
in Number sequence screen > Tab General
Your form works as I would expect! The reuse of unused numbers requires special treatment which your form fail to do.
As explained in the Number Sequence Framework, use the NumberSeqFormHandler class to control the acquisition and release of numbers.

Related Links

How do you access a macro in the AOT macro node?
How can I set the Backgoundcolor of an AX2012 Action Pane Button
How to Edit address using X++ in AX 2012
Number sequence issue Ax 2012?
Find code that's running in a Batch Job
What is the _isMexican boolean for in the Global::Checkpower method?
AlwaysOnTop property not behaving properly
Boolean AND logic in Microsoft Dynamics AX 2012 AIF QueryCriteria
Table: PrintMgmtSettings Field: Printjobsettings(Blob)
What happened to the hrplimittablerelationship table in ax-2012-r2?
Why is my changes ignored to releaseupdate scripts in dynamics ax 2012 r2
What is “old sys” exactly and why would I receive errors in 2012 because of a missing Macro?
How to filter records in line grid based on selected record in header grid?
Dynamic linking gets cleared when inserting new records
Box::info showing “refreshEx”
How to filter lookup values on a dialogfield in Report Dialog based on another dialogfield in AX 2012 AOT reports?

Categories

HOME
go
c++11
nvd3.js
wakanda
pyqt
jsf-2.2
ms-access-2016
aws-cli
gembox-spreadsheet
settings
vimdiff
startup
emoji
flash-player
chargify
red5
google-container-registry
digital-signature
jmp
nodemcu
backpack-for-laravel
roslyn
jquery-multiselect
bulletphysics
nstimer
fractions
iis-express
uitapgesturerecognizer
ntp
recurring-events
utorrent
contacts
installscript
gdata
ogc
tcc
plan-9
serde
cnc
mongotemplate
page-replacement
payara-micro
custom-font
stdmap
context-sensitive-grammar
compiler-design
pybrain
jtree
gets
myspace
scaffolding
observablecollection
spreadjs
cda
jbase
linklabel
alloy-ui
snoop
j-security-check
actionfilterattribute
cryptographichashfunction
personalization
codeplex
alternate
multitasking
windows-embedded-standard
abstract-data-type
jquery-1.9
pclzip
onmousemove
os.system
subgraph
listitem
database-create
predicatebuilder
floating-point-exceptions
ie-compatibility-mode
asynchronous-wcf-call
dojo-dnd

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App