This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
Dynamics AX 2012
|
|
|
|
|
|
|
This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following job shows how to create a palette by code and it pulls the pallet number from a number sequence. Important in the latter case, is to the call numberSeq.used() so that the drawn number is marked as "used".
static void howToUseNumberSeq(Args _args) { WMSPallet wmsPallet; NumberSeq numberSeq; #define.InventLocationId("12") #define.WMSLocationId("L01") ttsbegin; wmsPallet.clear(); wmsPallet.initValue(); wmsPallet.InventLocationId = #InventLocationId; wmsPallet.wmsLocationId = #WMSLocationId; numberSeq = WMSPallet::numberSeq(true,true); if (numberSeq) { wmsPallet.wmsPalletId = WMSPalletIdGenerate::newPalletIdFromNumberSeq(numberSeq); numberSeq.used(); } if(wmsPallet.validateWrite()) { wmsPallet.insert(); } else { throw error("@SYS96731"); } ttscommit; }