Adjust cost Item Entries on Jobqueue

sendohsendoh Member Posts: 207
Hi Experts,

I just want to ask, Is it possible to run the adjust cost - item entries in jobqeue? what will be my steps?

Regards,
Sendoh
Sendoh
be smart before being a clever.

Comments

  • DeepDeep Member Posts: 569
    Create a new codeunit, and call the codeunit "Inventory Adjustment" in it.
    Schedule the created codeunit in NAV job scheduler.
    Regards,

    Deep
    India
  • sendohsendoh Member Posts: 207
    what if I use the adjust cost - Item entries batch(report)?
    Sendoh
    be smart before being a clever.
  • DeepDeep Member Posts: 569
    The report asks for Closed period entry date.

    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);
    }
    Regards,

    Deep
    India
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    sendoh wrote:
    what if I use the adjust cost - Item entries batch(report)?

    yes u can use.
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Deep wrote:
    The report asks for Closed period entry date.

    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);
    }

    yes its true.

    follow this one
  • sendohsendoh Member Posts: 207
    ok Thanks Guys
    Sendoh
    be smart before being a clever.
  • ara3nara3n Member Posts: 9,256
    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


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Hanen_THanen_T Member Posts: 32
    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
  • ara3nara3n Member Posts: 9,256
    turn on the debugger and find where it is and write code

    IF GUIALLOWED THEN
    Dialog.update


    IF GUIALLOWED THEN
    Dialog.Open


    IF GUIALLOWED THEN
    Dialog.close
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • lavanyaballurgilavanyaballurgi Member Posts: 235
    InvtAdjmt.SetProperties(TODAY,FALSE);
    gives error as its Boolean & we are giving Date :shock:
Sign In or Register to comment.