{"title":"Codeunit 6126 E-Doc. GL Account Matching, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6126-e-doc-gl-account-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":6126,"name":"E-Doc. GL Account Matching","app":"E-Document Core","url":"https://jonas-paprotka.de/ref/codeunit/6126-e-doc-gl-account-matching/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6126-e-doc-gl-account-matching/source/","path":"src/Apps/W1/EDocument/App/src/Processing/AI/Tools/EDocGLAccountMatching.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":26,"kind":"trigger","steps":[[46,"ext","codeunit",6195,"Setup",1],[48,"ext","codeunit",6195,"Process",2],[48,"call","CreateUserMessage",1],[51,"ext","codeunit",7770,"GetFunctionResponses",0],[52,"ext","codeunit",7758,"GetResult",0],[53,"event","OnGetGLAccountMatchFunctionResponse",0],[60,"call","TryValidateGLAccountNo",2],[72,"call","GetConfidenceForNumberOfProposedAccounts",1],[78,"ext","codeunit",6122,"SetLineBool",3],[83,"ext","codeunit",7770,"GetFunctionResponses",0],[86,"ext","codeunit",8703,"LogUsage",4],[86,"ext","codeunit",6195,"GetEDocumentMatchingAssistanceName",0],[86,"call","GetFeatureName",0]]},{"name":"TryValidateGLAccountNo","line":90,"kind":"procedure","access":"local","params":2,"steps":[[93,"validate",6101,"[BC] Purchase Type No."]]},{"name":"CreateUserMessage","line":108,"kind":"procedure","access":"local","params":1,"steps":[[120,"call","BuildContext",1],[121,"call","BuildGLAccounts",0],[122,"call","BuildEDocumentPurchaseLines",1],[125,"event","OnUserMessageCreated",0]]},{"name":"BuildGLAccounts","line":147,"kind":"procedure","params":0,"steps":[[161,"call","BuildGLAccountName",1]]},{"name":"GetPrompt","line":219,"kind":"procedure","params":0,"steps":[[228,"call","GetName",0]]},{"name":"GetSystemPrompt","line":256,"kind":"procedure","params":1,"steps":[[265,"ext","codeunit",2200,"GetAzureKeyVaultSecret",2],[268,"call","GetFeatureName",0]]}]}