Sunday, July 3, 2016

Number Generation by EDT's reference without Parameter Number Sequence Reference

Number Sequence

Number Generation by EDT's reference without Parameter Number Sequence Reference

static void testnumseq(Args _args)
{
     theaxaptaEDT   _theaxaptaEDT   ;
     ExtendedTypeId id = TypeID2ExtendedTypeId(TypeId(theaxaptaEDT));//EDT NAME
     NumberSeq num = NumberSeq::newGetNum(NumberSequenceReference::find(id));
     ;
     //_theaxaptaEDT.NextNumseq = num.num();//NEXT NUM SEQ
     num.used(); // mark the number as used
     info(num.num()); // NEXT NUM SEQ
}
NumberSeq  num;
num = NumberSeq::newGetNumFromCode('SAO-Y');
info(num.num());

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...