Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 10657

Invent Journal and its relation with Voucher sequence number Dynamics Ax 2012 R3

$
0
0

 

X++ code for these Invent transfer and movement journal is available in different blogs and website. The voucher number for these entries is little bit tricky. This Voucher Number is set InventJournalName as fellow screen.

xyz

By writing this simple tip I used out of demo vm with contoso data.

So If expand the InventJounralName table we will find this voucher sequence number set in VoucherSequenceNumberTable field.

VoucherSequenceNumber

If we expand the Relation node of InventJournalName table we find its relationship with Sequence Number table based on RecId.

ReleationShip

For getting next voucher Number for Journal lines we have to use static method of NumberSeq  as

 

 

InventJournalName   inventJournalName;

NumberSeq     _sequence;

num _voucher;

select firstOnly inventJournalName

where inventJournalName.JournalType == InventJournalType::Any

ttsBegin;

_sequence=   NumberSeq::newGetNumFromId(   inventJournalName.VoucherNumberSequenceTable);

_voucher=_sequence.num();

ttsCommit;


Viewing all articles
Browse latest Browse all 10657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>