Announcements
dear ,
We have configured the Inventory recalculation routine to run in a batch scheduled once everyday. However we have noticed even though the batch is running successfully as scheduled but the effective "Recalculate stock up to date" of recalculation date is not changing. On every iteration of recalculation Ax is using the same date (date we configured the batch) instead of dynamically changing the effective date to current date.
I am wondering how do I configure batch to dynamically change the "Recalculate stock up to date? We are on Ax 2012 r3 .
Regards
Mohamed Abd Elnabi
*This post is locked for comments
I would prefer to check first if it is in batch mode or client mode
With that code you will enforce always get today's date for all scenario
Means if someone need to run manually to specific date not today then it become impossible
If I am not mistaken the checking would be isinbatch()
If yes use today's date else take the transdate passed from the form parameter
Another way to add parameter checkbox to say 'use current date' as a flag to determine run from form parameter date or get system date
dear ,,
this the source code for recalculation
dear Crispin
What is the change in this code?
this is the path
\Forms\InventAdjTransaction\Designs\DesignList\Post\Methods
form of source : InventAdj_Transact.run();
this is code :
void clicked()
{
InventClosing inventClosing;
InventAdj_Transact inventAdj_Transact;
// <GEERU>
inventAdj_Transact = InventAdj_Transact::newTransact(dataAdjTransact.pack(),inventTransCurrency);
// </GEERU>
if (!inventAdj_Transact.prompt())
{
return;
}
inventAdj_Transact.run();
super();
if (element.args().caller() && element.args().dataset() == tableNum(InventClosing))
{
inventClosing= element.args().record();
if (inventClosing.isFormDataSource())
{
inventClosing.dataSource().research();
}
}
element.close();
}
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,253 Most Valuable Professional
nmaenpaa 101,156