the function in object, present in codeunit 6500, there's a major threat in performance, if you use the tracking module. Here's the old code (with a lot of data, a single reclassification journal line could post in 20-30 seconds O.o)
IF ItemLedgEntry.FINDSET THEN
REPEAT
SumOfEntries += ItemLedgEntry."Remaining Quantity";
UNTIL ItemLedgEntry.NEXT = 0;
here's how i modified it:
ItemLedgEntry.CALCSUMS("Remaining Quantity");
SumOfEntries := ItemLedgEntry."Remaining Quantity";
//IF ItemLedgEntry.FINDSET THEN
//REPEAT
// SumOfEntries += ItemLedgEntry."Remaining Quantity";
//UNTIL ItemLedgEntry.NEXT = 0;
I'm wondering why it wasn't done in "my" way...any idea? Am I missing something, maybe?
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Comments
It will work fine on an SQL database but on a C/SIDE database you will get an error that you must select the right key.
Object Manager
anyway..the performance boost is so freakin' huge that they should have done a RECORDLEVELLOCKING switch for it, at least...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog