Dynamics AX Blog - Posts from 2018 - Page 2
These posts are machine-translated.
Currently, only posts from »2018« are displayed
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. |
|
|
|
|
|
|
Often, a function that has been created based on the SysOperation-framework, is called from a form via a button. Therefore there is the requirement, that the displayed data should be updated in the form after execution.
I like to use the following logic. This assumes that the call of the function is done via a button and thereby the main()-method is triggered.
This refresh is done via a sub-method and could look like this:
The call of this method takes place in the mentioned main():
Variations of the refreshCallingForm()
Instead of the task()-method of the form, one could also call some methods of the form data source.
Use of ExecuteQuery()
If you use the executeQuery() of the respective FomDataSource, any filters and the data set focus will be lost.
Use of ReSearch()
Use of ReRead()
A reRead() would be conceivable, but in this case only the active record would be updated.