in Number sequences in Axapta are a mechanism for generating unique numbers. These are generally used as a unique Id to identify a table record.
Every number sequence is linked to an ExtendedDataType inside Axapta. Therefore you will need to create separate datatypes for each number sequence which will be created.
Follow this doc to know how to create a new Number Sequence
http://dynamicsdx.files.wordpress.com/2010/10/numbersequencex.doc
You can increment the new Number Sequence as following
You can increment the new Number Sequence as following
static void ProformaIdSeq(Args _args)
{
ExtendedTypeId id = TypeID2ExtendedTypeId(TypeId(Thy_ProformaId));
NumberSeq num = NumberSeq::newGetNum(NumberSequenceReference::find(id));
;
num.used(); // mark the number as used
info(num.num());
}
{
ExtendedTypeId id = TypeID2ExtendedTypeId(TypeId(Thy_ProformaId));
NumberSeq num = NumberSeq::newGetNum(NumberSequenceReference::find(id));
;
num.used(); // mark the number as used
info(num.num());
}
Happy Daxing !
Aucun commentaire:
Enregistrer un commentaire