{"title":"Codeunit 6109 E-Document Import Helper, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6109-e-document-import-helper/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-11-07","object":{"type":"codeunit","id":6109,"name":"E-Document Import Helper","app":"E-Document Core","url":"https://jonas-paprotka.de/ref/codeunit/6109-e-document-import-helper/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6109-e-document-import-helper/source/","path":"src/Apps/W1/EDocument/App/src/Helpers/EDocumentImportHelper.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:6115":{"name":"E-Document Error Helper","url":"https://jonas-paprotka.de/ref/codeunit/6115-e-document-error-helper/"},"codeunit:1251":{"name":"Record Match Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1251-record-match-mgt/"},"table:39":{"name":"Purchase Line","url":"https://jonas-paprotka.de/ref/table/39-purchase-line/"},"table:290":{"name":"VAT Amount Line","url":"https://jonas-paprotka.de/ref/table/290-vat-amount-line/"},"codeunit:66":{"name":"Purch - Calc Disc. By Type","url":"https://jonas-paprotka.de/ref/codeunit/66-purch-calc-disc-by-type/"},"codeunit:57":{"name":"Document Totals","url":"https://jonas-paprotka.de/ref/codeunit/57-document-totals/"},"codeunit:6122":{"name":"E-Doc. Imp. Session Telemetry","url":"https://jonas-paprotka.de/ref/codeunit/6122-e-doc-imp-session-telemetry/"},"table:23":{"name":"Vendor","url":"https://jonas-paprotka.de/ref/table/23-vendor/"},"codeunit:6123":{"name":"E-Document Notification","url":"https://jonas-paprotka.de/ref/codeunit/6123-e-document-notification/"},"codeunit:6140":{"name":"E-Doc. Import","url":"https://jonas-paprotka.de/ref/codeunit/6140-e-doc-import/"},"table:1251":{"name":"Text-to-Account Mapping","url":"https://jonas-paprotka.de/ref/table/1251-text-to-account-mapping/"},"table:5777":{"name":"Item Reference","url":"https://jonas-paprotka.de/ref/table/5777-item-reference/"},"codeunit:8617":{"name":"Config. Validate Management","url":"https://jonas-paprotka.de/ref/codeunit/8617-config-validate-management/"}},"procs":[{"name":"ResolveUnitOfMeasureFromDataImport","line":34,"kind":"procedure","params":2,"steps":[[70,"ext","codeunit",6115,"LogErrorMessage",4]]},{"name":"FindItemReferenceForLine","line":80,"kind":"procedure","params":2,"steps":[[105,"call","FindMatchingItemReference",2],[111,"call","ResolveUnitOfMeasureFromItemReference",3]]},{"name":"FindItemForLine","line":121,"kind":"procedure","params":2,"steps":[[150,"call","ResolveUnitOfMeasureFromItem",3]]},{"name":"FindGLAccountForLine","line":160,"kind":"procedure","params":2,"steps":[[179,"call","FindAppropriateGLAccount",4]]},{"name":"LogErrorIfItemNotFound","line":196,"kind":"procedure","params":2,"steps":[[212,"ext","codeunit",6115,"LogErrorMessage",4],[217,"ext","codeunit",6115,"LogErrorMessage",4],[222,"ext","codeunit",6115,"LogErrorMessage",4]]},{"name":"ValidateReceivingCompanyInfo","line":267,"kind":"procedure","params":2,"steps":[[270,"call","MatchCompanyByServiceParticipant",2]]},{"name":"ValidateReceivingCompanyInfo","line":280,"kind":"procedure","params":1,"steps":[[294,"ext","codeunit",6115,"LogErrorMessage",4],[300,"call","ValidateReceivingCompanyInfoByNameAndAddress",1],[305,"ext","codeunit",6115,"LogErrorMessage",4],[309,"ext","codeunit",6115,"LogErrorMessage",4],[311,"call","ExtractVatRegNo",2],[311,"call","ExtractVatRegNo",2],[312,"ext","codeunit",6115,"LogErrorMessage",4]]},{"name":"ValidateReceivingCompanyInfoByNameAndAddress","line":338,"kind":"procedure","params":1,"steps":[[351,"ext","codeunit",1251,"CalculateStringNearness",4],[351,"call","MatchThreshold",0],[351,"call","NormalizingFactor",0],[352,"ext","codeunit",1251,"CalculateStringNearness",4],[352,"call","MatchThreshold",0],[352,"call","NormalizingFactor",0],[354,"call","RequiredNearness",0],[355,"ext","codeunit",6115,"LogErrorMessage",4],[357,"call","RequiredNearness",0],[358,"ext","codeunit",6115,"LogErrorMessage",4]]},{"name":"ApplyInvoiceDiscount","line":367,"kind":"procedure","params":3,"steps":[[389,"ext","table",39,"CalcVATAmountLines",4],[390,"ext","table",290,"GetTotalInvDiscBaseAmount",2],[392,"ext","codeunit",66,"InvoiceDiscIsAllowed",1],[393,"ext","codeunit",66,"ApplyInvDiscBasedOnAmt",2],[395,"ext","codeunit",6115,"LogErrorMessage",4]]},{"name":"VerifyTotal","line":407,"kind":"procedure","params":3,"steps":[[431,"ext","codeunit",57,"PurchaseCalculateTotalsWithInvoiceRounding",3],[434,"ext","codeunit",6115,"LogSimpleErrorMessage",2]]},{"name":"FindVendor","line":460,"kind":"procedure","params":4,"steps":[[465,"call","FindVendorByNo",1],[467,"ext","codeunit",6122,"SetText",2],[471,"call","FindVendorByGLN",1],[473,"ext","codeunit",6122,"SetText",2],[477,"call","FindVendorByVATRegistrationNo",1],[479,"ext","codeunit",6122,"SetText",2],[483,"call","FindVendorByRegistrationNo",1],[485,"ext","codeunit",6122,"SetText",2]]},{"name":"FindVendorByVATRegistrationNo","line":548,"kind":"procedure","params":1,"steps":[[555,"ext","table",23,"FindVendorByVATRegistrationNo",1]]},{"name":"FindVendorByPhoneNo","line":592,"kind":"procedure","params":1,"steps":[[607,"ext","codeunit",1251,"CalculateStringNearness",4],[607,"call","MatchThreshold",0],[607,"call","NormalizingFactor",0],[608,"call","RequiredNearness",0]]},{"name":"FindVendorByNameAndAddress","line":619,"kind":"procedure","params":2,"steps":[[621,"call","FindVendorByNameAndAddressWithNotification",3]]},{"name":"FindVendorByNameAndAddressWithNotification","line":631,"kind":"procedure","params":3,"steps":[[646,"ext","codeunit",1251,"CalculateStringNearness",4],[646,"call","MatchThreshold",0],[646,"call","NormalizingFactor",0],[648,"call","RequiredNearness",0],[650,"ext","codeunit",1251,"CalculateStringNearness",4],[650,"call","MatchThreshold",0],[650,"call","NormalizingFactor",0],[651,"call","RequiredNearness",0],[652,"call","RequiredNearness",0],[657,"ext","codeunit",6123,"AddVendorMatchedByNameNotAddressNotification",1],[662,"ext","codeunit",6122,"SetBool",2]]},{"name":"FindCustomerByNameAndAddress","line":671,"kind":"procedure","params":2,"steps":[[682,"ext","codeunit",1251,"CalculateStringNearness",4],[682,"call","MatchThreshold",0],[682,"call","NormalizingFactor",0],[684,"call","RequiredNearness",0],[686,"ext","codeunit",1251,"CalculateStringNearness",4],[686,"call","MatchThreshold",0],[686,"call","NormalizingFactor",0],[687,"call","RequiredNearness",0],[687,"call","RequiredNearness",0]]},{"name":"FindVendorByBankAccount","line":699,"kind":"procedure","params":3,"steps":[[706,"call","TryFindLeastBlockedVendorNoByVendorBankAcc",1],[713,"call","TryFindLeastBlockedVendorNoByVendorBankAcc",1]]},{"name":"GetVendor","line":725,"kind":"procedure","params":2,"steps":[[728,"ext","codeunit",6115,"LogSimpleErrorMessage",2],[731,"call","LogErrorIfVendorIsSelfBilling",2]]},{"name":"LogErrorIfVendorIsSelfBilling","line":755,"kind":"procedure","params":2,"steps":[[758,"ext","codeunit",6115,"LogSimpleErrorMessage",2]]},{"name":"ProcessDocument","line":768,"kind":"procedure","params":2,"steps":[[773,"ext","codeunit",6140,"ProcessIncomingEDocument",2]]},{"name":"SetHideDialogs","line":781,"kind":"procedure","params":1,"steps":[[783,"ext","codeunit",6140,"SetHideDialogs",1]]},{"name":"ProcessField","line":839,"kind":"procedure","access":"internal","params":4,"steps":[[842,"call","ProcessDecimalField",4]]},{"name":"ProcessField","line":855,"kind":"procedure","access":"internal","params":4,"steps":[[860,"call","SetFieldValue",3]]},{"name":"ProcessDecimalField","line":863,"kind":"procedure","access":"internal","params":4,"steps":[[868,"call","SetDecimalFieldValue",3]]},{"name":"FindAppropriateGLAccount","line":886,"kind":"procedure","access":"local","params":4,"steps":[[907,"ext","table",1251,"SearchEnteriesInText",3],[909,"call","FindCorrectAccountFromMapping",3],[911,"ext","codeunit",6115,"LogErrorMessage",4],[916,"ext","table",1251,"SearchEnteriesInText",3],[918,"call","FindCorrectAccountFromMapping",3],[920,"ext","codeunit",6115,"LogErrorMessage",4],[941,"ext","codeunit",6115,"LogErrorMessage",4]]},{"name":"FindMatchingItemReference","line":946,"kind":"procedure","access":"local","params":2,"steps":[[954,"ext","table",5777,"HasValidUnitOfMeasure",0],[961,"ext","table",5777,"HasValidUnitOfMeasure",0]]},{"name":"ResolveUnitOfMeasureFromItemReference","line":969,"kind":"procedure","access":"local","params":3,"steps":[[987,"call","ResolveUnitOfMeasureFromItem",3],[991,"ext","codeunit",6115,"LogErrorMessage",4],[991,"call","UnitCodeToString",1],[995,"ext","table",5777,"HasValidUnitOfMeasure",0],[996,"ext","codeunit",6115,"LogErrorMessage",4],[996,"call","UnitCodeToString",1],[1000,"call","InsertOrUpdateUnitOfMeasureCode",2]]},{"name":"ResolveUnitOfMeasureFromItem","line":1005,"kind":"procedure","access":"local","params":3,"steps":[[1024,"ext","codeunit",6115,"LogErrorMessage",4],[1024,"call","UnitCodeToString",1],[1028,"call","InsertOrUpdateUnitOfMeasureCode",2]]},{"name":"SetDecimalFieldValue","line":1087,"kind":"procedure","access":"local","params":3,"steps":[[1093,"ext","codeunit",8617,"EvaluateValueWithValidate",3],[1095,"ext","codeunit",6115,"LogSimpleErrorMessage",2]]},{"name":"SetFieldValue","line":1098,"kind":"procedure","access":"local","params":3,"steps":[[1103,"call","TruncateValueToFieldLength",2],[1104,"ext","codeunit",8617,"EvaluateValueWithValidate",3],[1106,"ext","codeunit",6115,"LogSimpleErrorMessage",2]]}]}