{"title":"Report 840 Suggest Worksheet Lines, extension points 29","url":"https://jonas-paprotka.de/ref/report/840-suggest-worksheet-lines/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"report","id":840,"name":"Suggest Worksheet Lines","app":"Base Application","url":"https://jonas-paprotka.de/ref/report/840-suggest-worksheet-lines/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/report/840-suggest-worksheet-lines/source/","path":"src/Layers/W1/BaseApp/CashFlow/Worksheet/SuggestWorksheetLines.Report.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:9179":{"name":"Application Area Mgmt. Facade","url":"https://jonas-paprotka.de/ref/codeunit/9179-application-area-mgmt-facade/"},"codeunit:841":{"name":"Cash Flow Management","url":"https://jonas-paprotka.de/ref/codeunit/841-cash-flow-management/"},"codeunit:850":{"name":"Cash Flow Forecast Handler","url":"https://jonas-paprotka.de/ref/codeunit/850-cash-flow-forecast-handler/"},"table:846":{"name":"Cash Flow Worksheet Line","url":"https://jonas-paprotka.de/ref/table/846-cash-flow-worksheet-line/"},"table:840":{"name":"Cash Flow Forecast","url":"https://jonas-paprotka.de/ref/table/840-cash-flow-forecast/"},"table:847":{"name":"Cash Flow Forecast Entry","url":"https://jonas-paprotka.de/ref/table/847-cash-flow-forecast-entry/"},"table:4":{"name":"Currency","url":"https://jonas-paprotka.de/ref/table/4-currency/"},"table:15":{"name":"G/L Account","url":"https://jonas-paprotka.de/ref/table/15-g-l-account/"},"table:330":{"name":"Currency Exchange Rate","url":"https://jonas-paprotka.de/ref/table/330-currency-exchange-rate/"},"table:843":{"name":"Cash Flow Setup","url":"https://jonas-paprotka.de/ref/table/843-cash-flow-setup/"}},"procs":[{"name":"Cash Flow Account.OnAfterGetRecord","line":50,"kind":"trigger","steps":[[57,"call","ClearCircularRefData",0],[58,"call","GetSubPostingGLAccounts",2],[66,"call","InsertCFLineForGLAccount",1]]},{"name":"Cust. Ledger Entry.OnAfterGetRecord","line":83,"kind":"trigger","steps":[[95,"call","InsertCFLineForCustLedgerEntry",0]]},{"name":"Vendor Ledger Entry.OnAfterGetRecord","line":111,"kind":"trigger","steps":[[123,"call","InsertCFLineForVendorLedgEntry",0]]},{"name":"Purchase Line.OnAfterGetRecord","line":139,"kind":"trigger","steps":[[150,"call","InsertCFLineForPurchaseLine",0]]},{"name":"Purchase Line.OnPreDataItem","line":153,"kind":"trigger","steps":[[161,"ext","codeunit",9179,"IsSuiteEnabled",0],[161,"ext","codeunit",9179,"IsAllDisabled",0]]},{"name":"Sales Line.OnAfterGetRecord","line":169,"kind":"trigger","steps":[[180,"call","InsertCFLineForSalesLine",0]]},{"name":"InvestmentFixedAsset.OnAfterGetRecord","line":196,"kind":"trigger","steps":[[204,"call","InsertCFLineForFixedAssetsBudget",0]]},{"name":"SaleFixedAsset.OnAfterGetRecord","line":223,"kind":"trigger","steps":[[233,"call","InsertCFLineForFixedAssetsDisposal",0]]},{"name":"Cash Flow Manual Expense.OnAfterGetRecord","line":252,"kind":"trigger","steps":[[257,"call","InsertCFLineForManualExpense",0]]},{"name":"Cash Flow Manual Revenue.OnAfterGetRecord","line":273,"kind":"trigger","steps":[[278,"call","InsertCFLineForManualRevenue",0]]},{"name":"CFAccountForBudget.OnAfterGetRecord","line":294,"kind":"trigger","steps":[[307,"event","OnCFAccountForBudgetOnAfterGetRecordOnAfterGLBudgEntrySetFilters",0],[310,"call","InsertCFLineForGLBudget",1]]},{"name":"Job Planning Line.OnAfterGetRecord","line":328,"kind":"trigger","steps":[[336,"event","OnJobPlanningLineOnAfterGetRecordOnBeforeInsertCFLineForJobPlanningLine",0],[337,"call","InsertCFLineForJobPlanningLine",0]]},{"name":"Job Planning Line.OnPreDataItem","line":340,"kind":"trigger","steps":[[348,"ext","codeunit",9179,"IsJobsEnabled",0],[348,"ext","codeunit",9179,"IsAllDisabled",0]]},{"name":"Purchase Header.OnAfterGetRecord","line":356,"kind":"trigger","steps":[[363,"call","InsertCFLineForTax",1]]},{"name":"Purchase Header.OnPreDataItem","line":366,"kind":"trigger","steps":[[374,"ext","codeunit",9179,"IsSuiteEnabled",0],[374,"ext","codeunit",9179,"IsAllDisabled",0],[377,"ext","codeunit",841,"SetViewOnPurchaseHeaderForTaxCalc",2]]},{"name":"Sales Header.OnAfterGetRecord","line":384,"kind":"trigger","steps":[[391,"call","InsertCFLineForTax",1]]},{"name":"Sales Header.OnPreDataItem","line":394,"kind":"trigger","steps":[[402,"ext","codeunit",841,"SetViewOnSalesHeaderForTaxCalc",2]]},{"name":"VAT Entry.OnAfterGetRecord","line":408,"kind":"trigger","steps":[[415,"call","InsertCFLineForTax",1]]},{"name":"VAT Entry.OnPreDataItem","line":418,"kind":"trigger","steps":[[426,"ext","codeunit",841,"SetViewOnVATEntryForTaxCalc",2]]},{"name":"Cash Flow Azure AI Buffer.OnAfterGetRecord","line":432,"kind":"trigger","steps":[[434,"call","InsertCFLineForAzureAIForecast",1]]},{"name":"Cash Flow Azure AI Buffer.OnPreDataItem","line":437,"kind":"trigger","steps":[[447,"ext","codeunit",850,"CalculateForecast",0]]},{"name":"Cash Flow Azure AI Buffer.OnPostDataItem","line":460,"kind":"trigger","steps":[[464,"call","InsertWorksheetLines",1],[465,"call","DeleteEntries",1]]},{"name":"OnPreReport","line":659,"kind":"trigger","steps":[[667,"call","NoOptionsChosen",0]]},{"name":"InsertTempCFWorksheetLine","line":782,"kind":"procedure","params":2,"steps":[[792,"event","OnInsertTempCFWorksheetLineOnBeforeCalculateCFAmountAndCFDate",1],[794,"ext","table",846,"CalculateCFAmountAndCFDate",0],[795,"call","SetCashFlowDate",2],[802,"call","InsertConditionMet",0],[803,"write",846,"Insert"]]},{"name":"InsertWorksheetLines","line":806,"kind":"procedure","access":"local","params":1,"steps":[[814,"write",846,"DeleteAll"],[822,"write",846,"Insert",1],[826,"write",840,"Insert"],[831,"write",846,"DeleteAll"]]},{"name":"DeleteEntries","line":834,"kind":"procedure","access":"local","params":1,"steps":[[844,"event","OnDeleteEntriesOnBeforeDeleteAllCashFlowForecastEntry",0],[845,"write",847,"DeleteAll"],[848,"write",840,"DeleteAll"]]},{"name":"InsertCFLineForGLAccount","line":851,"kind":"procedure","access":"local","params":1,"steps":[[862,"call","SetCashFlowDate",2],[866,"ext","table",846,"MoveDefualtDimToJnlLineDim",3],[867,"event","OnInsertCFLineForGLAccountOnBeforeInsertTempCFWorksheetLine",0],[868,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertCFLineForCustLedgerEntry","line":871,"kind":"procedure","access":"local","params":0,"steps":[[891,"call","SetCashFlowDate",2],[899,"ext","table",4,"InitRoundingPrecision",0],[915,"event","OnInsertCFLineForCustLedgerEntryOnBeforeInsertTempCFWorksheetLine",0],[916,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertCFLineForVendorLedgEntry","line":919,"kind":"procedure","access":"local","params":0,"steps":[[938,"call","SetCashFlowDate",2],[947,"ext","table",4,"InitRoundingPrecision",0],[963,"event","OnInsertCFLineForVendorLedgEntryOnBeforeInsertTempCFWorksheetLine",0],[964,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertCFLineForPurchaseLine","line":967,"kind":"procedure","access":"local","params":0,"steps":[[975,"call","CalculateLineAmountForPurchaseLine",2],[996,"call","SetCashFlowDate",2],[998,"call","CalculateLineAmountForPurchaseLine",2],[1011,"event","OnInsertCFLineForPurchaseLineOnBeforeInsertTempCFWorksheetLine",0],[1012,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertCFLineForSalesLine","line":1016,"kind":"procedure","access":"local","params":0,"steps":[[1024,"call","CalculateLineAmountForSalesLine",2],[1045,"call","SetCashFlowDate",2],[1048,"call","GetSalesOrderPrepaymentAmt",1],[1050,"call","CalculateLineAmountForSalesLine",2],[1063,"event","OnInsertCFLineForSalesLineOnBeforeInsertTempCFWorksheetLine",0],[1064,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertCFLineForFixedAssetsBudget","line":1068,"kind":"procedure","access":"local","params":0,"steps":[[1070,"call","SetFALedgerEntryFilters",0],[1073,"call","InitCFLineForFixedAssetsBudget",0],[1074,"ext","table",846,"MoveDefualtDimToJnlLineDim",3],[1075,"call","InsertTempCFWorksheetLine",2]]},{"name":"InitCFLineForFixedAssetsBudget","line":1088,"kind":"procedure","access":"local","params":0,"steps":[[1100,"call","SetCashFlowDate",2],[1104,"event","OnAfterInitCFLineForFixedAssetsBudget",0]]},{"name":"InsertCFLineForFixedAssetsDisposal","line":1107,"kind":"procedure","access":"local","params":0,"steps":[[1119,"call","SetCashFlowDate",2],[1123,"ext","table",846,"MoveDefualtDimToJnlLineDim",3],[1124,"event","OnInsertCFLineForFixedAssetsDisposalOnBeforeInsertTempCFWorksheetLine",0],[1125,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertCFLineForManualExpense","line":1128,"kind":"procedure","access":"local","params":0,"steps":[[1138,"ext","table",846,"MoveDefualtDimToJnlLineDim",3],[1146,"event","OnInsertCFLineForManualExpenseOnBeforeInsertManualData",0],[1150,"call","InsertManualData",3],[1154,"call","InsertManualData",3],[1159,"call","InsertManualData",3]]},{"name":"InsertCFLineForManualRevenue","line":1162,"kind":"procedure","access":"local","params":0,"steps":[[1172,"ext","table",846,"MoveDefualtDimToJnlLineDim",3],[1181,"event","OnInsertCFLineForManualRevenueOnBeforeInsertManualData",0],[1186,"call","InsertManualData",3],[1190,"call","InsertManualData",3],[1195,"call","InsertManualData",3]]},{"name":"InsertCFLineForGLBudget","line":1198,"kind":"procedure","access":"local","params":1,"steps":[[1211,"call","SetCashFlowDate",2],[1216,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertCFLineForJobPlanningLine","line":1219,"kind":"procedure","access":"local","params":0,"steps":[[1229,"call","InsertConditionMet",0],[1230,"call","GetJobPlanningAmountForCFLine",1],[1231,"call","InsertOrModifyCFLine",1],[1242,"call","CheckCashFlowAccountNo",1],[1256,"call","SetCashFlowDate",2],[1259,"call","GetJobPlanningAmountForCFLine",1],[1261,"event","OnInsertCFLineForJobPlanningLineOnBeforeInsertTempCFWorksheetLine",0],[1262,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertCFLineForTax","line":1266,"kind":"procedure","params":1,"steps":[[1272,"call","GetTaxPayableDateFromSource",1],[1273,"call","IsDateBeforeStartOfCurrentPeriod",1],[1273,"call","HasTaxBeenPaidOn",1],[1279,"call","GetTaxAmountFromSource",1],[1286,"call","InsertConditionMet",0],[1287,"call","GetTaxAmountFromSource",1],[1288,"call","InsertOrModifyCFLine",1],[1299,"call","GetDescriptionForTaxCashFlowLine",1],[1300,"call","SetCashFlowDate",2],[1302,"call","GetTaxAmountFromSource",1],[1310,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertCFLineForAzureAIForecast","line":1317,"kind":"procedure","access":"local","params":1,"steps":[[1327,"call","SetCashFlowDate",2],[1415,"call","InsertTempCFWorksheetLine",2]]},{"name":"InsertOrModifyCFLine","line":1418,"kind":"procedure","access":"local","params":1,"steps":[[1422,"write",846,"Modify"],[1424,"call","InsertTempCFWorksheetLine",2]]},{"name":"GetSubPostingGLAccounts","line":1427,"kind":"procedure","params":2,"steps":[[1440,"write",15,"Insert"],[1445,"call","CheckCircularRefs",1]]},{"name":"SetCashFlowDate","line":1457,"kind":"procedure","params":2,"steps":[[1462,"event","OnBeforeSetCashFlowDate",1]]},{"name":"CalculateLineAmountForPurchaseLine","line":1474,"kind":"procedure","access":"local","params":2,"steps":[[1479,"call","GetPurchaseAmountForCFLine",1],[1487,"ext","table",330,"ExchangeAmtFCYToLCY",4],[1494,"ext","table",4,"InitRoundingPrecision",0],[1500,"ext","table",4,"VATRoundingDirection",0]]},{"name":"CalculateLineAmountForSalesLine","line":1503,"kind":"procedure","access":"local","params":2,"steps":[[1508,"call","GetSalesAmountForCFLine",1],[1516,"ext","table",330,"ExchangeAmtFCYToLCY",4],[1523,"ext","table",4,"InitRoundingPrecision",0],[1529,"ext","table",4,"VATRoundingDirection",0]]},{"name":"NoOptionsChosen","line":1532,"kind":"procedure","access":"local","params":0,"steps":[[1538,"event","OnBeforeNoOptionsChosen",1]]},{"name":"InitializeRequest","line":1548,"kind":"procedure","params":4,"steps":[[1554,"event","OnAfterInitializeRequest",0]]},{"name":"InsertManualData","line":1557,"kind":"procedure","access":"local","params":3,"steps":[[1566,"call","SetCashFlowDate",2],[1568,"call","InsertTempCFWorksheetLine",2]]},{"name":"GetTaxPayableDateFromSource","line":1587,"kind":"procedure","access":"local","params":1,"steps":[[1601,"event","OnGetTaxPayableDateFromSourceOnBeforeExit",0],[1602,"ext","table",843,"GetTaxPaymentDueDate",1]]},{"name":"HasTaxBeenPaidOn","line":1605,"kind":"procedure","access":"local","params":1,"steps":[[1612,"ext","table",843,"GetTaxPaymentStartDate",1]]},{"name":"GetTaxAmountFromSource","line":1643,"kind":"procedure","access":"local","params":1,"steps":[[1650,"ext","codeunit",841,"GetTaxAmountFromSalesOrder",1],[1652,"ext","codeunit",841,"GetTaxAmountFromPurchaseOrder",1],[1657,"event","OnAfterGetTaxAmountFromSource",0]]},{"name":"IsDateBeforeStartOfCurrentPeriod","line":1662,"kind":"procedure","access":"local","params":1,"steps":[[1666,"ext","table",843,"GetCurrentPeriodStartDate",0]]},{"name":"CheckCircularRefs","line":1669,"kind":"procedure","access":"local","params":1,"steps":[[1674,"call","GetRecursiveLimit",0],[1680,"call","CountRepeatedElement",1],[1681,"call","GetCircularRefErrorMessage",1]]},{"name":"GetRecursiveLimit","line":1700,"kind":"procedure","access":"local","params":0,"steps":[[1703,"event","OnAfterGetRecursiveLimit",0]]}]}