Discussion:
Abort number sequence
(too old to reply)
Fanatic
2009-01-19 15:16:01 UTC
Permalink
Hi, I have a question
I have created a new number sequence, which I allocate when the record is
created. The number sequence is set to continouous. So far no problem. On one
form, there is a cancel button, which have to delete the record and abort the
number sequence, so it can be used later on again.

Does anyone know how to do this?

grtz
DTM
2009-01-19 15:39:03 UTC
Permalink
hi Fanatic, you can try this,

NumberSeq::release(NumberSequenceCode,voucher);

Exemple:

select * from NumberSequenceGroupRef
where NumberSequenceGroupRef.numberSequenceGroupId ==
SalesTable.NumberSequenceGroup
&& NumberSequenceGroupRef.dataTypeId == 256;
if(NumberSequenceGroupRef.numberSequenceCode)
{
NumberSEquenceCode = NumberSequenceGroupRef.numberSequenceCode;
Voucher = NumberSeq::newGetNumFromCode(NumberSequenceCode).num();
NumberSeq::release(NumberSequenceCode,voucher);

}
Post by Fanatic
Hi, I have a question
I have created a new number sequence, which I allocate when the record is
created. The number sequence is set to continouous. So far no problem. On one
form, there is a cancel button, which have to delete the record and abort the
number sequence, so it can be used later on again.
Does anyone know how to do this?
grtz
Conrado
2009-06-04 17:12:01 UTC
Permalink
Hi DTM,

I'm having the same issue and I tried to do your suggestion. However, after
releasing the number sequence, AX Looks like locked when I try to allocate a
new number sequence.

Have you seen something similar ?

Thank,
Post by DTM
hi Fanatic, you can try this,
NumberSeq::release(NumberSequenceCode,voucher);
select * from NumberSequenceGroupRef
where NumberSequenceGroupRef.numberSequenceGroupId ==
SalesTable.NumberSequenceGroup
&& NumberSequenceGroupRef.dataTypeId == 256;
if(NumberSequenceGroupRef.numberSequenceCode)
{
NumberSEquenceCode = NumberSequenceGroupRef.numberSequenceCode;
Voucher = NumberSeq::newGetNumFromCode(NumberSequenceCode).num();
NumberSeq::release(NumberSequenceCode,voucher);
}
Post by Fanatic
Hi, I have a question
I have created a new number sequence, which I allocate when the record is
created. The number sequence is set to continouous. So far no problem. On one
form, there is a cancel button, which have to delete the record and abort the
number sequence, so it can be used later on again.
Does anyone know how to do this?
grtz
Loading...