4

Please add Setcurrentkey for index “Document Type", Open, "Posting Date", "Closed at Date" to CalcAverageCollectionDays function in "Activities Mgt."(CodeUnit 1311) as calculation accessing Customer ledger entry is very slow.

Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team

Comments

R

I have included the missing setcurrentkey command in the comment below

Category: Development

R

    local procedure GetPaidSalesInvoices(var CustLedgerEntry: Record "Cust. Ledger Entry")    begin CustLedgerEntry.Setcurrentkey(“Document Type", Open, "Posting Date", "Closed at Date");        CustLedgerEntry.SetRange("Document Type", CustLedgerEntry."Document Type"::Invoice);        CustLedgerEntry.SetRange(Open, false);        CustLedgerEntry.SetRange("Posting Date", CalcDate('', GetDefaultWorkDate()), GetDefaultWorkDate());        CustLedgerEntry.SetRange("Closed at Date", CalcDate('', GetDefaultWorkDate()), GetDefaultWorkDate());    end;

Category: Development

R

The following AL code is slow as a resultAppObjectType: CodeUnit AppObjectId: 1311 AL CallStack: "Activities Mgt."(CodeUnit 1311).CalcAverageCollectionDays line 8 - Base Application by Microsoft"O365 Activities Dictionary"(CodeUnit 1310).OnRun(Trigger) line 9 - Base Application by Microsoft

Category: Development