CU 5847 Get Average Cost Calc Overview

genericgeneric Member Posts: 511
Hello In Codeunit 5847 there is a function

EntryIsAppliedIncrease(InbndItemLedgEntryNo : Integer) : Boolean
WITH ItemApplnEntry DO BEGIN
  RESET;
  SETCURRENTKEY(
    "Inbound Item Entry No.","Item Ledger Entry No.","Outbound Item Entry No.","Cost Application");
  SETRANGE("Inbound Item Entry No.",InbndItemLedgEntryNo);
  SETRANGE("Item Ledger Entry No.",InbndItemLedgEntryNo);
  SETFILTER("Outbound Item Entry No.",'<>%1',0);
  SETRANGE("Cost Application",TRUE);
  EXIT(FIND('-'));
END;


My question is it's exit(find('-')) instead of findfirst or (NOT isempty) ?
This will have better performance considering it is called for every Item Ledger Entry.
Thanks.
Sign In or Register to comment.