{"title":"Page 233 Apply Vendor Entries, extension points 29","url":"https://jonas-paprotka.de/ref/page/233-apply-vendor-entries/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":"page","id":233,"name":"Apply Vendor Entries","app":"Base Application","url":"https://jonas-paprotka.de/ref/page/233-apply-vendor-entries/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/page/233-apply-vendor-entries/source/","path":"src/Layers/W1/BaseApp/Purchases/Payables/ApplyVendorEntries.Page.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:113":{"name":"Vend. Entry-Edit","url":"https://jonas-paprotka.de/ref/codeunit/113-vend-entry-edit/"},"table:25":{"name":"Vendor Ledger Entry","url":"https://jonas-paprotka.de/ref/table/25-vendor-ledger-entry/"},"page:344":{"name":"Navigate","url":"https://jonas-paprotka.de/ref/page/344-navigate/"},"codeunit:1630":{"name":"Office Management","url":"https://jonas-paprotka.de/ref/codeunit/1630-office-management/"},"codeunit:90":{"name":"Purch.-Post","url":"https://jonas-paprotka.de/ref/codeunit/90-purch-post/"},"codeunit:111":{"name":"Vend. Entry-SetAppl.ID","url":"https://jonas-paprotka.de/ref/codeunit/111-vend-entry-setappl-id/"},"codeunit:225":{"name":"Gen. Jnl.-Apply","url":"https://jonas-paprotka.de/ref/codeunit/225-gen-jnl-apply/"},"codeunit:366":{"name":"Exchange Acc. G/L Journal Line","url":"https://jonas-paprotka.de/ref/codeunit/366-exchange-acc-g-l-journal-line/"},"table:330":{"name":"Currency Exchange Rate","url":"https://jonas-paprotka.de/ref/table/330-currency-exchange-rate/"},"codeunit:426":{"name":"Payment Tolerance Management","url":"https://jonas-paprotka.de/ref/codeunit/426-payment-tolerance-management/"},"table:4":{"name":"Currency","url":"https://jonas-paprotka.de/ref/table/4-currency/"},"codeunit:227":{"name":"VendEntry-Apply Posted Entries","url":"https://jonas-paprotka.de/ref/codeunit/227-vendentry-apply-posted-entries/"},"table:579":{"name":"Apply Unapply Parameters","url":"https://jonas-paprotka.de/ref/table/579-apply-unapply-parameters/"},"table:98":{"name":"General Ledger Setup","url":"https://jonas-paprotka.de/ref/table/98-general-ledger-setup/"},"page:579":{"name":"Post Application","url":"https://jonas-paprotka.de/ref/page/579-post-application/"}},"procs":[{"name":"AppliesToID.OnValidate","line":122,"kind":"trigger","steps":[[130,"call","SetVendApplId",1],[133,"call","UpdateCustomAppliesToIDForGenJournal",1]]},{"name":"Amount to Apply.OnValidate","line":220,"kind":"trigger","steps":[[222,"run","codeunit",113],[227,"call","SetVendApplId",1],[229,"call","AmountToApplyOnAfterValidate",0]]},{"name":"Pmt. Discount Date.OnValidate","line":249,"kind":"trigger","steps":[[251,"call","RecalcApplnAmount",0]]},{"name":"Remaining Pmt. Disc. Possible.OnValidate","line":271,"kind":"trigger","steps":[[273,"call","RecalcApplnAmount",0]]},{"name":"Dimensions.OnAction","line":442,"kind":"trigger","steps":[[444,"ext","table",25,"ShowDimensions",0]]},{"name":"Navigate.OnAction","line":467,"kind":"trigger","steps":[[469,"ext","page",344,"SetDoc",2]]},{"name":"ActionSetAppliesToID.OnAction","line":490,"kind":"trigger","steps":[[495,"call","SetVendApplId",1]]},{"name":"ActionPostApplication.OnAction","line":508,"kind":"trigger","steps":[[510,"call","PostDirectApplication",1]]},{"name":"Preview.OnAction","line":522,"kind":"trigger","steps":[[524,"call","PostDirectApplication",1]]},{"name":"ShowPostedDocument.OnAction","line":562,"kind":"trigger","steps":[[564,"ext","table",25,"ShowDoc",0]]},{"name":"ShowDocumentAttachment.OnAction","line":575,"kind":"trigger","steps":[[577,"ext","table",25,"ShowPostedDocAttachment",0]]},{"name":"OnAfterGetCurrRecord","line":636,"kind":"trigger","steps":[[639,"call","CalcApplnAmount",0],[640,"ext","table",25,"HasPostedDocAttachment",0]]},{"name":"Category_Category5.OnAfterGetRecord","line":643,"kind":"trigger","steps":[[645,"ext","table",25,"SetStyle",0]]},{"name":"OnModifyRecord","line":653,"kind":"trigger","steps":[[658,"event","OnModifyRecordOnBeforeRunCodeunitVendEntryEdit",1],[660,"run","codeunit",113],[662,"call","CalcApplnAmount",0]]},{"name":"OnOpenPage","line":676,"kind":"trigger","steps":[[683,"call","FindApplyingEntry",0],[686,"call","ActivateFields",0],[694,"call","CalcApplnAmount",0],[696,"ext","codeunit",1630,"IsAvailable",0],[698,"event","OnAfterOpenPage",0]]},{"name":"OnQueryClosePage","line":701,"kind":"trigger","steps":[[707,"event","OnBeforeOnQueryClosePage",1],[710,"call","LookupOKOnPush",0],[714,"event","OnBeforeEarlierPostingDateError",0],[722,"event","OnQueryClosePageOnAfterEarlierPostingDateTest",0],[727,"call","RunVendEntryEdit",1],[731,"call","CheckActionPerformed",0],[739,"call","RunVendEntryEdit",1]]},{"name":"SetGenJnlLine","line":802,"kind":"procedure","params":2,"steps":[[822,"call","SetApplyingVendLedgEntry",0]]},{"name":"UpdateCustomAppliesToIDForGenJournal","line":832,"kind":"procedure","access":"local","params":1,"steps":[[836,"call","JournalHasDocumentNo",1]]},{"name":"RunVendEntryEdit","line":844,"kind":"procedure","access":"local","params":1,"steps":[[846,"event","OnBeforeRunVendEntryEdit",0],[847,"run","codeunit",113]]},{"name":"SetPurch","line":850,"kind":"procedure","params":3,"steps":[[855,"ext","codeunit",90,"SumPurchLines",6],[878,"call","SetApplyingVendLedgEntry",0]]},{"name":"SetApplyingVendLedgEntry","line":886,"kind":"procedure","params":0,"steps":[[891,"event","OnBeforeSetApplyingVendLedgEntry",1],[895,"call","SetApplyingVendLedgEntryPurchaseHeader",0],[897,"call","SetApplyingVendLedgEntryGenJnlLine",0],[899,"call","SetApplyingVendLedgEntryDirect",0],[902,"call","CalcApplnAmount",0],[905,"event","OnAfterSetApplyingVendLedgEntry",0]]},{"name":"SetApplyingVendLedgEntryPurchaseHeader","line":908,"kind":"procedure","access":"local","params":0,"steps":[[928,"event","OnAfterSetApplyingVendLedgEntryPurchaseHeader",0]]},{"name":"SetApplyingVendLedgEntryGenJnlLine","line":931,"kind":"procedure","access":"local","params":0,"steps":[[951,"event","OnAfterSetApplyingVendLedgEntryGenJnlLine",0]]},{"name":"SetApplyingVendLedgEntryDirect","line":954,"kind":"procedure","access":"local","params":0,"steps":[[959,"run","codeunit",113],[961,"call","SetVendApplId",1],[967,"call","SetVendApplId",1],[975,"event","OnSetApplyingVendLedgEntryOnBeforeCalcTypeDirectCalcApplnAmount",0]]},{"name":"SetVendApplId","line":978,"kind":"procedure","params":1,"steps":[[981,"call","CheckVendLedgEntry",1],[982,"event","OnSetVendApplIdOnAfterCheckAgainstApplnCurrency",0],[990,"event","OnSetVendApplIdOnAfterSetFilter",0],[992,"call","CallVendEntrySetApplIDSetApplId",0],[994,"call","CalcApplnAmount",0]]},{"name":"CallVendEntrySetApplIDSetApplId","line":997,"kind":"procedure","access":"local","params":0,"steps":[[1002,"event","OnBeforeCallVendEntrySetApplIDSetApplId",1],[1007,"ext","codeunit",111,"SetApplId",3],[1009,"ext","codeunit",111,"SetApplId",3]]},{"name":"CheckVendLedgEntry","line":1012,"kind":"procedure","params":1,"steps":[[1020,"event","OnBeforeEarlierPostingDateError",0],[1027,"event","OnCheckVendLedgEntryOnAfterEarlierPostingDateTest",0],[1031,"event","OnCheckVendLedgEntryOnBeforeCheckAgainstApplnCurrency",0],[1032,"ext","codeunit",225,"CheckAgainstApplnCurrency",4]]},{"name":"CalcApplnAmount","line":1038,"kind":"procedure","params":0,"steps":[[1043,"event","OnBeforeCalcApplnAmount",1],[1055,"call","FindAmountRounding",0],[1074,"event","OnCalcApplnAmountOnAfterAppliedVendLedgEntrySetFilter",0],[1077,"call","HandleChosenEntries",4],[1082,"call","FindAmountRounding",0],[1084,"run","codeunit",366],[1093,"ext","table",330,"ExchangeAmtFCYToFCY",4],[1096,"ext","table",330,"ExchangeAmtFCYToFCY",4],[1099,"ext","table",330,"ExchangeAmtFCYToFCY",4],[1108,"ext","codeunit",426,"CheckCalcPmtDiscGenJnlVend",4],[1118,"call","CheckRounding",0],[1128,"call","HandleChosenEntries",4],[1135,"call","FindAmountRounding",0],[1145,"ext","table",330,"ExchangeAmtFCYToFCY",4],[1152,"call","CheckRounding",0],[1161,"call","HandleChosenEntries",4],[1168,"event","OnAfterCalcApplnAmount",0]]},{"name":"CalcApplnRemainingAmount","line":1171,"kind":"procedure","access":"protected","params":1,"steps":[[1182,"ext","table",330,"ApplnExchangeAmtFCYToFCY",5],[1185,"event","OnAfterCalcApplnRemainingAmount",0]]},{"name":"CalcApplnAmountToApply","line":1189,"kind":"procedure","access":"local","params":1,"steps":[[1201,"ext","table",330,"ApplnExchangeAmtFCYToFCY",5],[1204,"event","OnAfterCalcApplnAmountToApply",0]]},{"name":"FindAmountRounding","line":1208,"kind":"procedure","access":"protected","params":0,"steps":[[1213,"ext","table",4,"InitRoundingPrecision",0]]},{"name":"FindApplyingEntry","line":1252,"kind":"procedure","access":"local","params":0,"steps":[[1267,"event","OnFindApplyingEntryOnAfterSetFilters",0],[1270,"event","OnFindApplyingEntryOnBeforeAssignTempApplyingVendLedgEntry",0],[1277,"event","OnFindApplyingEntryOnBeforeCalcApplnAmount",0],[1278,"call","CalcApplnAmount",0]]},{"name":"HandleChosenEntries","line":1282,"kind":"procedure","access":"protected","params":4,"steps":[[1294,"event","OnBeforeHandledChosenEntries",1],[1305,"write",25,"Insert"],[1306,"event","OnHandleChosenEntriesOnAfterTempAppliedVendLedgEntryInsert",0],[1315,"call","ExchangeLedgerEntryAmounts",4],[1319,"ext","codeunit",426,"CheckCalcPmtDiscVend",5],[1321,"ext","codeunit",426,"CheckCalcPmtDiscGenJnlVend",4],[1352,"call","CalcOppositeEntriesAmount",1],[1369,"call","ExchangeLedgerEntryAmounts",4],[1386,"write",25,"Delete"],[1390,"call","CheckRounding",0]]},{"name":"AmountToApplyOnAfterValidate","line":1393,"kind":"procedure","access":"local","params":0,"steps":[[1396,"call","CalcApplnAmount",0]]},{"name":"RecalcApplnAmount","line":1401,"kind":"procedure","access":"local","params":0,"steps":[[1404,"call","CalcApplnAmount",0]]},{"name":"PostDirectApplication","line":1412,"kind":"procedure","access":"local","params":1,"steps":[[1424,"event","OnBeforePostDirectApplication",1],[1431,"call","IsTheApplicationValid",0],[1432,"ext","codeunit",227,"GetApplicationDate",1],[1434,"event","OnPostDirectApplicationBeforeSetValues",0],[1436,"ext","table",579,"CopyFromVendLedgEntry",1],[1437,"ext","table",98,"GetRecordOnce",0],[1445,"ext","page",579,"SetParameters",1],[1450,"ext","page",579,"GetParameters",1],[1452,"event","OnPostDirectApplicationOnBeforeCheckApplicationDate",1],[1458,"event","OnPostDirectApplicationBeforeApply",0],[1460,"ext","codeunit",227,"PreviewApply",2],[1462,"ext","codeunit",227,"Apply",2],[1464,"event","OnPostDirectApplicationOnAfterApply",0]]},{"name":"CheckActionPerformed","line":1477,"kind":"procedure","access":"local","params":0,"steps":[[1485,"event","OnBeforeCheckActionPerformed",1]]},{"name":"ExchangeLedgerEntryAmounts","line":1502,"kind":"procedure","access":"protected","params":4,"steps":[[1514,"event","OnExchangeLedgerEntryAmountsOnBeforeCalculateAmounts",1],[1520,"ext","table",330,"ExchangeAmount",4],[1523,"ext","table",330,"ExchangeAmount",4],[1526,"ext","table",330,"ExchangeAmount",4],[1530,"event","OnAfterExchangeLedgerEntryAmounts",0]]}]}