Thats why if you prepare a new codeunit, you can avoid the request form, and can store "TODAY" as posting date.
Like this:
OnRun()
ItemApplnEntry.LOCKTABLE;
IF NOT ItemApplnEntry.FIND('+') THEN
EXIT;
ItemLedgEntry.LOCKTABLE;
IF NOT ItemLedgEntry.FIND('+') THEN
EXIT;
AvgCostAdjmtEntryPoint.LOCKTABLE;
IF AvgCostAdjmtEntryPoint.FIND('+') THEN;
ValueEntry.LOCKTABLE;
IF NOT ValueEntry.FIND('+') THEN
EXIT;
Thats why if you prepare a new codeunit, you can avoid the request form, and can store "TODAY" as posting date.
Like this:
OnRun()
ItemApplnEntry.LOCKTABLE;
IF NOT ItemApplnEntry.FIND('+') THEN
EXIT;
ItemLedgEntry.LOCKTABLE;
IF NOT ItemLedgEntry.FIND('+') THEN
EXIT;
AvgCostAdjmtEntryPoint.LOCKTABLE;
IF AvgCostAdjmtEntryPoint.FIND('+') THEN;
ValueEntry.LOCKTABLE;
IF NOT ValueEntry.FIND('+') THEN
EXIT;
In addition, you need to modify inventory adjustment codeunit to not open any Dialogs.
Also I usually when I create a codeunit to loop through the items sorted by Low Level Code, and run the Inventory adjust CU with one item with IF Codeunit.RUN then. at a time and then commit.
That way if there is an error, only that item roles back. And I can get a list of items that had problems and send out an email.
Ahmed Rashed Amini
Independent Consultant/Developer
How do you do that ar3an, that's very interresting and this is what I need. I have to schedule the item adjust cost on NAS but even if eliminate all the dialogue on the report there still be some functions that call dialogs on CDU :oops:
Technico-Functional Consultant NAV It's all about passion of Navision World
Comments
Schedule the created codeunit in NAV job scheduler.
Deep
India
be smart before being a clever.
Thats why if you prepare a new codeunit, you can avoid the request form, and can store "TODAY" as posting date.
Like this:
OnRun()
ItemApplnEntry.LOCKTABLE;
IF NOT ItemApplnEntry.FIND('+') THEN
EXIT;
ItemLedgEntry.LOCKTABLE;
IF NOT ItemLedgEntry.FIND('+') THEN
EXIT;
AvgCostAdjmtEntryPoint.LOCKTABLE;
IF AvgCostAdjmtEntryPoint.FIND('+') THEN;
ValueEntry.LOCKTABLE;
IF NOT ValueEntry.FIND('+') THEN
EXIT;
InvtAdjmt.SetProperties(TODAY,FALSE);
InvtAdjmt.MakeMultiLevelAdjmt;
{
UpdateItemAnalysisView.UpdateAll(0,TRUE);
}
Deep
India
yes u can use.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
yes its true.
follow this one
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
be smart before being a clever.
Also I usually when I create a codeunit to loop through the items sorted by Low Level Code, and run the Inventory adjust CU with one item with IF Codeunit.RUN then. at a time and then commit.
That way if there is an error, only that item roles back. And I can get a list of items that had problems and send out an email.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
It's all about passion of Navision World
IF GUIALLOWED THEN
Dialog.update
IF GUIALLOWED THEN
Dialog.Open
IF GUIALLOWED THEN
Dialog.close
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
gives error as its Boolean & we are giving Date :shock: