{"title":"Codeunit 6129 E-Doc. Deferral Matching, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6129-e-doc-deferral-matching/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":"codeunit","id":6129,"name":"E-Doc. Deferral Matching","app":"E-Document Core","url":"https://jonas-paprotka.de/ref/codeunit/6129-e-doc-deferral-matching/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6129-e-doc-deferral-matching/source/","path":"src/Apps/W1/EDocument/App/src/Processing/AI/Tools/EDocDeferralMatching.Codeunit.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:6195":{"name":"E-Doc. AI Tool Processor","url":"https://jonas-paprotka.de/ref/codeunit/6195-e-doc-ai-tool-processor/"},"codeunit:7770":{"name":"AOAI Operation Response","url":"https://jonas-paprotka.de/ref/codeunit/7770-aoai-operation-response/"},"codeunit:7758":{"name":"AOAI Function Response","url":"https://jonas-paprotka.de/ref/codeunit/7758-aoai-function-response/"},"codeunit:6122":{"name":"E-Doc. Imp. Session Telemetry","url":"https://jonas-paprotka.de/ref/codeunit/6122-e-doc-imp-session-telemetry/"},"codeunit:8703":{"name":"Feature Telemetry","url":"https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/"},"table:6101":{"name":"E-Document Purchase Line","url":"https://jonas-paprotka.de/ref/table/6101-e-document-purchase-line/"},"codeunit:2200":{"name":"Azure Key Vault","url":"https://jonas-paprotka.de/ref/codeunit/2200-azure-key-vault/"}},"procs":[{"name":"OnRun","line":23,"kind":"trigger","steps":[[43,"ext","codeunit",6195,"Setup",1],[44,"ext","codeunit",6195,"Process",2],[44,"call","CreateUserMessage",1],[47,"ext","codeunit",7770,"GetFunctionResponses",0],[48,"ext","codeunit",7758,"GetResult",0],[49,"event","OnGetDeferralMatchFunctionResponse",0],[56,"call","TryValidateDeferralCode",2],[74,"ext","codeunit",6122,"SetLineBool",3],[79,"ext","codeunit",7770,"GetFunctionResponses",0],[82,"ext","codeunit",8703,"LogUsage",4],[82,"ext","codeunit",6195,"GetEDocumentMatchingAssistanceName",0],[82,"call","GetFeatureName",0]]},{"name":"TryValidateDeferralCode","line":86,"kind":"procedure","access":"local","params":2,"steps":[[88,"validate",6101,"[BC] Deferral Code"]]},{"name":"CreateUserMessage","line":91,"kind":"procedure","access":"local","params":1,"steps":[[96,"call","BuildEDocumentPurchaseLines",1],[97,"call","BuildDeferralTemplates",0]]},{"name":"GetPrompt","line":138,"kind":"procedure","params":0,"steps":[[147,"call","GetName",0]]},{"name":"GetSystemPrompt","line":176,"kind":"procedure","params":1,"steps":[[185,"ext","codeunit",2200,"GetAzureKeyVaultSecret",2],[188,"call","GetFeatureName",0]]}]}