0

"UPDATED" Repost of LAST SALES DATE

i've included the c/al code for a custom field in our navision database.
Was hoping someone would know how to calculate this in jet

CalcLastSaleDate() : Date


ItemLedgEntry.RESET;
ItemLedgEntry.SETCURRENTKEY("Source Type","Entry Type","Item No.","Posting Date");
ItemLedgEntry.SETRANGE("Source Type",ItemLedgEntry."Source Type"::Customer);
ItemLedgEntry.SETRANGE("Entry Type",ItemLedgEntry."Entry Type"::Sale);
ItemLedgEntry.SETRANGE("Item No.","No.");
IF ItemLedgEntry.FIND('+') THEN
LastDate := ItemLedgEntry."Posting Date"
ELSE
LastDate := 0D;
EXIT(LastDate);

4 comments

Please sign in to leave a comment.