Adjust Cost - Item Entries

navuser1navuser1 Member Posts: 1,329
I am facing a problem when I am runing The Batch job named "Adjust Cost - Item Entries".It gives the

Error mesage is like that

Another user has modified the record for this Item After you retrieve it from the database.

Enter the change again in the updated window or start the....again.



Item No. = xxx.

plz suggest.how to solve it??
Now or Never

Comments

  • kinekine Member Posts: 12,562
    which NAV version?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • navuser1navuser1 Member Posts: 1,329
    I am using Navision version 3.7
    Now or Never
  • kinekine Member Posts: 12,562
    Have you some modification in this report and the codeunit for the Cost adjustment?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • navuser1navuser1 Member Posts: 1,329
    Yes Sir,

    There are some modifycation in the related objects.
    Now or Never
  • navuser1navuser1 Member Posts: 1,329
    Dear All,

    I have replaced all the Modified objects(related to Adjust Cost - Item Entries) with the Navision Base.but the batch job shows the same error message.
    Now or Never
  • SavatageSavatage Member Posts: 7,142
    have you tried it with everyone off the system?

    Have you tried turning on the debugger to see where is stops?
  • navuser1navuser1 Member Posts: 1,329
    Debugger stop in the codeunit 5804,function name "Updateunitcost".
    code...

    WITH Item DO BEGIN
    IF NewStdCost <> 0 THEN
    "Standard Cost" := NewStdCost;

    IF "Costing Method" = "Costing Method"::Standard THEN
    "Unit Cost" := "Standard Cost"
    ELSE BEGIN
    IF CalledFromAdjustment THEN BEGIN
    CostCalcMgt.GetRndgSetup(GLSetup,Currency,RndgSetupRead);
    IF CalculateAverageInclExpCost(Item,AverageCost,AverageCostACY) THEN
    IF AverageCost <> 0 THEN
    "Unit Cost" := ROUND(AverageCost,GLSetup."Unit-Amount Rounding Precision");
    END ELSE BEGIN
    IF ("Unit Cost" = 0) AND (InvoicedQty > 0) AND (LastDirectCost <> 0) THEN BEGIN
    CALCFIELDS("Net Invoiced Qty.");
    IF ("Net Invoiced Qty." > 0) AND ("Net Invoiced Qty." <= InvoicedQty) THEN
    "Unit Cost" := LastDirectCost;
    END;
    END;
    END;

    IF RecalcStdCost THEN
    RecalcStdCostItem(Item);

    IF LastDirectCost <> 0 THEN
    "Last Direct Cost" := LastDirectCost;
    VALIDATE("Price/Profit Calculation");
    MODIFY; //error
    Now or Never
  • mgillmgill Member Posts: 20
    Hi All,

    Is there any solution to this issue? Even I am facing the same problem in Nav 3.70

    Thanks,
    Manpreet
  • ara3nara3n Member Posts: 9,256
    Change the code to the following
    WITH Item DO BEGIN
    //MOD start
    Get("No.");
    //mod end
    IF NewStdCost <> 0 THEN
    

    If you want the MS solution, then you'll need to search partner source for hotfixes or upgrade to latest version of NAV.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • vikram7_dabasvikram7_dabas Member Posts: 611
    Dear Subroto
    same Field of item is modified twice(The field with vaidate which u show us), thats y it is showing u error.
    Vikram Dabas
    Navision Technical Consultant
Sign In or Register to comment.