I have a strange error.
We have own codeunit which does some steps of automatic order process, such as updates free quantity in lines, stores order in archive and etc.
COMMIT calls after each step of processing, so I can see in debug mode that correct values has been written to database. And at the same time I can see in parallel opened NAV app that values are on their places. I hope you understand me.
Strange things begin when at one step calls procedure form standart codeunit 5063 - Archive Management
IsSalesHeaderArchived(Rec : Record “Sales Header”) : Boolean
WITH Rec DO BEGIN
At this point Sales Lines differ from it was before starting autoprocess. I can see it in database, but…
This piece of code from Archive Management codeunit. (Standart, not modified):
SalesLine.SETRANGE(“Document Type”,SalesHeader.“Document Type”);
IF SalesLine.FINDSET THEN
… at this point I see in debug that there are old Sales Lines! As they were before autoprocess started! And ArchiveManagement stores order with old lines!
At the same time I look in parallel opened NAV that Sales Lines are new.
So the problem that in debug sales lines record does not get new data from database, even if I call CLEAR and CLEARALL.
Is this a kind of memory overflow or something?
This error appears on clients test base, and on our test base does not appear.
Bases are almost the same. Nav 5.0 SP1. All objects synchronized.
I don’t know what to do.
thanks in advance for any help.