web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

How to find next value from sequence number when sequence number reference not in parameter table.

Ali Zaidi Profile Picture Ali Zaidi 4,657

Many times we have to generate and assign sequence number in X++. And usually we find attached sequence number form Parameter tables.  We can get customer through following X++ code

 

NumberSeq     _sequence;

ttsBegin;

 

_sequence = NumberSeq::newGetNum( CustParameters::numRefCustAccount());

    info((_sequence.num()));

info(_sequence.Num());

    info((_sequence.num()));

 

ttsCommit;

 

But sometimes these reference methods did not available in these Parameters table. For these fields you can get sequence number with reference to extended data type. For example if you have to find next value for CustInvoiceId of Free text Invoice of customer you have check the extended data type of field. And then get the next number with reference to Extended Data Type

 

NumberSeq     _sequence;

ttsBegin;

_sequence = NumberSeq::newGetNum( NumberSeqReference::findReference(extendedTypeNum(CustInvoiceId)));

info((_sequence.num()));

ttsCommit;

 

Comments

*This post is locked for comments