Dynamics AX Blog - Dynamics AX 2012 - whs - Microsoft Dynamics AX (Axapta)

In recent years, i spent a lot of time in developing in the environment of Microsoft Dynamics AX (formerly Axapta). During this time i created a lot of code, from which I could imagine, that it might be very useful for other AX developers too. But I will present also tips and tricks round the powerful ERP system.
Subscribe to RSS feed of this category
RSS-Feed of this version
Release load to warehouseThe following code snippet executes the "Release to warehouse" function of a load, but without generating the waves/work. static void Job1(Args _args) { ttsBegin; WHSLoadPostEngine::post(whsLoadTable::find('USMF-000004', true)); ttsCommit; } |
Process wave through codeWith the following code, you can process a wave through code. This is normally done when calling the function "Release to warehouse", depending on the WHS parameters. WHSPostEngine::post(WaveTable::find('USMF-000000003'));
|
Add sales order line to existing load through codeIn this post I would like to show how you can add all the lines of an sales order or even a selection of sales order lines by code to an existing load. |
Mobile Device Portal: Simple field validationFor the first time, I had the requirement to implement a simple field validation in the Mobile Device Portal (MDP). After I have tried something with the WHSWorkExecute class, I have found the class method WHSRFControlData.processData() as well suited for such type of exams. case #Qty: qty = WHSWorkExecuteDisplay::str2numDisplay(data); if (qty <= 0) { errorMessage = "@WAX1172"; hasError = true; break; } //--> Start if (pass.exists(#ProdId) && pass.lookupStr(#ProdId) != "" && mode == WHSWorkExecuteMode::ReportAsFinished) { my_ProdTable = ProdTable::find(pass.lookup(#ProdId)); if (qty + my_ProdTable.reportedFinishedGood() + my_ProdTable.reportedFinishedError() > my_ProdTable.QtyStUp) { errorMessage = "@SYS16097"; hasError = true; break; } } //<-- End |
|
|
|
|
|
|
The following snippet shows how to build waves and work for one ore more delivery through code. This will usually happen if you use the "Release to warehouse" function.