hi all,
ive recently upgraded navision version 4.0 to navision version 4.0 sp2.
there wasnt much customisations, so the merge of the objects was often a replace of the 4.0 sp2 objects.
running the adjust cost - item entries batch job is resulting in a error that says:
"Another use has modified the record for this Avg. Cost Adjmt. Entry Point after you retrieved it from the database.
Enter your changes again in the updated window, or start the interrupted activity again.
Identification fields and values:
Item No.='Item001',Variant Code='',Location Code='TransitLocation'"
It halts on:
Adjmt. Level: 1
Item No.: Item001
Adjust: Average
Cost FW. Level: 1
Entry No.: x
Strange thing about this is that the entry no.it stops on does not contain that location code in the item ledger entry table?
Secondly, when you try run the batch job again - it stops at a different entry no.?
I know theres a fix for a similar error in Version 3.7's Codeunit 5895, but does anyone have any ideas for Nav 4.0 SP2.
Thanks
0
Answers
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
we took everyone off the system when running the routine.
procedure was as follows:
1.) Merge objects
2.) Import into database
3.) Convert database
If you did the first way you are ok. If you did the second way then you need to load SP1 (~700 objects) first and then SP2 objects.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Restoring bkup on navision database helped - the error message didn't appear. Still, client has sql and it has to work on sql.
Changing the transaction level didn't help either.
AdjustItemAvgCost
IF NOT IsAvgCostItem THEN
EXIT;
UpDateWindow(WindowAdjmtLevel,WindowItem,Text008,WindowFWLevel,WindowEntry);
WITH AvgCostAdjmtEntryPoint DO
WHILE AvgCostAdjmtEntryPointExist(TempAvgCostAdjmtEntryPoint) DO
REPEAT
AvgCostAdjmtEntryPoint := TempAvgCostAdjmtEntryPoint;
DELETE;
- the codeunit is standard. debugger stops on the DELETE
Did you try the same with a native database?
(backup in navision, restore in new C-side db and run routine)
With native it works fine
But we need it on SQL...
Idea of: SQL->backup->Native,restore->Adjust Cost->Native,backup->SQL, restore is not the best solution
that should solve it.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Is it an official 'patch'?
Because Microsoft is working with the problem quite long time... :evil:
BTW: maybe you have also such good solution for infinite loop during adjusting cost (in 4.0SP1 SQL version)? I searched a bit in forum, but in most cases advices were "serch for it"
And it looks that in v.4 there were no reports about infinite loop...
The infinite loop is a little hard to solve because it depends on how your item application are done. So it depends on data and I will need data (db) to solve it.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Should I look inside, try to find 'wrong' application entry and change/delete it ?
I have 10 items ending in loop.
The easiest one is quite simple - it has only 8 transfer entries:
location A -> transit B -> location C -> transit D -> location A
1. -4 for A
2. +4 for B
3. -4 for B
4. +4 for C
5. -4 for C
6. +4 for D
7. -4 for D
8. +4 for A
Every entry posted with the same posting date. Average costing.
Where should I look?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
But... do you suggest that there are no such thing in W1 code? I would expect that the case I described earlier (8 transfer entries) is quite easy and typical (well - at least during tests) :?
Anyway - thank you for "GET" solution - it helped a lot
yes that GET does work.
sorry for the late reply!
i think we can set this Topic to Resolved now?
Thanks again
I guess Radek.bb is still working on anothe with adjust cost. So it's up to you to update the title to solved.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
ill wait till they feel the issue is resolved
My other problem with infinite loop during adjustments completely different story. ](*,)
The direct cause of problem are incorrect entries in 5804 table (Avg. Cost Adjmt. Entry Point). In the example I presented earlier (8 entries) there were missing line for one of the locations. For other items I discovered that there are to many entries in 5804 table. Usually it is enough to delete one/two record to receive correct adjustment for all entries.
Since new items are rising this error (loop) my guess is that the real cause of the problem is automatic cost posting procedure. It looks like that in multi-user environment sometimes the procedure is not finishing properly - and leave wrong entries in 5804 table. When I try to run a batch for adjustment - it is too late.
Well... - the solution is turn it off...
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Seems that navision still has a lot of trouble with such a thing.
...
Everybody on-line.
...
Looking good!