Codeunit 104045

Hallo, I have searched the forum for problems with this CU - I want to upgrade from 3.60 to 4.0 - but could not find the right answer. In: it is stated, to change the original code for ‘LocationHasBins’, but my original code differs: WITH ItemLedgEntry DO BEGIN COPY(NewItemLedgEntry); SETRANGE(“Item No.”); SETRANGE(“Variant Code”); EXIT(FIND(’-’)); END; For me it seems that there is aloop, but I could not find out why. Has anyone made the same experience or better - a solution for this. Thanks Michael

Where is the loop? Can you post the piece of code you are refering to. Also make sure to put within [ code] … [ /code] tags so that its readable. … WITH ItemLedgEntry DO BEGIN COPY(NewItemLedgEntry); SETRANGE("Item No."); SETRANGE("Variant Code"); EXIT(FIND('-')); END;

Hello, in the function UpdateItemledgerEntry there is a call to LocationHasbins. When I start the CU, there comes the window: Searching the Item Ledger Entry Table. After 8 hours I cancelled the program, because Navision was still searching and the progress was still 0%. The code-example I wrote, comes from LocationHasBins, whereas the code differs from what I have read in this forum (see address in my first statement), because it is concerned with updating to 3.70. So I guess, Navision has changed the code, but did not solve the problem. Also at Prtnerguide, there is no request for Upgrading to 4.0, but this problem is reported frequently for Upgrading to 3.70.

Hello, In my Database CU 104045 ist not present. But look if for Tabel “ItemLedgEntry” a SETCURRENTKEY is set to work with Speed. The Primary Key of Item Leger Entry is Field: “Entry No.” If there are many Records in your Tabel then Navision will search in all Records.

The issue is with the Keys…You will get better speed if you remove the ones you don’t need for the migration steps. You can also use the Client Monitor to determine where your table searches are coming from in C/U 104045 and fix those as well.

I’ve experienced this too. The problem is this piece of code is executed for every single itemLedgerEntry in the table (and I had millions). In my case, I checked the bin code in the ILE table manually, noticed it was blank in all the records and decided to skip the piece of code. (after all it only saved some information for a later step in conversion if the bin code was filled). This reduced the conversion time with 90%.

Hi, I have experienced this problem before and to be blunt it is duff code from MBS resulting in a “broken” key. Simply issue a suitable set current key before the setrange and it should fly.

OK Now I know what you are talking about. Best is put a line of code like if bincontent.find('-') then begin all the bin junk... end; AND fix the key issue. This is a joke, the error has been around for ages, and its time it was fixed.

Many thanks for the hints, now it works in a normal time.