{"title":"Codeunit 6168 E-Document Upgrade, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6168-e-document-upgrade/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-16","object":{"type":"codeunit","id":6168,"name":"E-Document Upgrade","app":"E-Document Core","url":"https://jonas-paprotka.de/ref/codeunit/6168-e-document-upgrade/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6168-e-document-upgrade/source/","path":"src/Apps/W1/EDocument/App/src/Setup/EDocumentUpgrade.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:9999":{"name":"Upgrade Tag","url":"https://jonas-paprotka.de/ref/codeunit/9999-upgrade-tag/"},"codeunit:6161":{"name":"E-Document Install","url":"https://jonas-paprotka.de/ref/codeunit/6161-e-document-install/"},"table:6121":{"name":"E-Document","url":"https://jonas-paprotka.de/ref/table/6121-e-document/"},"table:312":{"name":"Purchases & Payables Setup","url":"https://jonas-paprotka.de/ref/table/312-purchases-payables-setup/"},"table:6122":{"name":"E-Doc. Service Supported Type","url":"https://jonas-paprotka.de/ref/table/6122-e-doc-service-supported-type/"},"codeunit:6133":{"name":"E-Document Background Jobs","url":"https://jonas-paprotka.de/ref/codeunit/6133-e-document-background-jobs/"},"table:6433":{"name":"E-Doc. Payment Occurrence","url":"https://jonas-paprotka.de/ref/table/6433-e-doc-payment-occurrence/"}},"procs":[{"name":"OnUpgradePerCompany","line":22,"kind":"trigger","steps":[[24,"call","UpgradeLogURLMaxLength",0],[26,"call","UpgradeProcessDraftEnum",0],[28,"call","UpgradeDataExchV2Defs",0],[29,"call","UpgradeEnableVATOptionsForPurchEDoc",0],[30,"call","UpgradeSupportedTypeDirection",0],[31,"call","UpgradePaymentOccurrenceDispatcher",0],[32,"call","UpgradePaymentOccurrenceRetryStatus",0]]},{"name":"UpgradeLogURLMaxLength","line":35,"kind":"procedure","access":"local","params":0,"steps":[[41,"ext","codeunit",9999,"HasUpgradeTag",1],[41,"call","GetUpgradeLogURLMaxLengthUpgradeTag",0],[49,"ext","codeunit",9999,"SetUpgradeTag",1],[49,"call","GetUpgradeLogURLMaxLengthUpgradeTag",0]]},{"name":"UpgradeDataExchV2Defs","line":52,"kind":"procedure","access":"local","params":0,"steps":[[57,"ext","codeunit",9999,"HasUpgradeTag",1],[57,"call","GetUpgradeDataExchV2DefsTag",0],[60,"ext","codeunit",6161,"ImportInvoiceV2XML",0],[61,"ext","codeunit",6161,"ImportCreditMemoV2XML",0],[63,"ext","codeunit",9999,"SetUpgradeTag",1],[63,"call","GetUpgradeDataExchV2DefsTag",0]]},{"name":"RegisterPerCompanyTags","line":67,"kind":"procedure","access":"local","params":1,"steps":[[69,"call","GetUpgradeLogURLMaxLengthUpgradeTag",0],[70,"call","GetUpgradeProcessDraftEnumTag",0],[71,"call","GetUpgradeDataExchV2DefsTag",0],[72,"call","GetEnableVATOptionsForPurchEDocTag",0],[73,"call","GetUpgradeSupportedTypeDirectionTag",0],[74,"call","GetPaymentOccurrenceDispatcherUpgradeTag",0],[75,"call","GetPaymentOccurrenceRetryStatusUpgradeTag",0]]},{"name":"UpgradeProcessDraftEnum","line":84,"kind":"procedure","access":"local","params":0,"steps":[[89,"ext","codeunit",9999,"HasUpgradeTag",1],[89,"call","GetUpgradeProcessDraftEnumTag",0],[94,"write",6121,"ModifyAll"],[96,"ext","codeunit",9999,"SetUpgradeTag",1],[96,"call","GetUpgradeProcessDraftEnumTag",0]]},{"name":"UpgradeEnableVATOptionsForPurchEDoc","line":105,"kind":"procedure","access":"local","params":0,"steps":[[110,"ext","codeunit",9999,"HasUpgradeTag",1],[110,"call","GetEnableVATOptionsForPurchEDocTag",0],[115,"write",312,"Modify"],[118,"ext","codeunit",9999,"SetUpgradeTag",1],[118,"call","GetEnableVATOptionsForPurchEDocTag",0]]},{"name":"UpgradeSupportedTypeDirection","line":131,"kind":"procedure","access":"internal","params":0,"steps":[[138,"ext","codeunit",9999,"HasUpgradeTag",1],[138,"call","GetUpgradeSupportedTypeDirectionTag",0],[142,"write",6122,"ModifyAll"],[148,"call","IsFallbackSecondaryType",1],[154,"write",6122,"Insert"],[158,"ext","codeunit",9999,"SetUpgradeTag",1],[158,"call","GetUpgradeSupportedTypeDirectionTag",0]]},{"name":"UpgradePaymentOccurrenceDispatcher","line":178,"kind":"procedure","access":"internal","params":0,"steps":[[183,"ext","codeunit",9999,"HasUpgradeTag",1],[183,"call","GetPaymentOccurrenceDispatcherUpgradeTag",0],[186,"ext","codeunit",6133,"EnsurePaymentOccurrenceDispatcher",0],[188,"ext","codeunit",9999,"SetUpgradeTag",1],[188,"call","GetPaymentOccurrenceDispatcherUpgradeTag",0]]},{"name":"UpgradePaymentOccurrenceRetryStatus","line":196,"kind":"procedure","access":"local","params":0,"steps":[[201,"ext","codeunit",9999,"HasUpgradeTag",1],[201,"call","GetPaymentOccurrenceRetryStatusUpgradeTag",0],[207,"write",6433,"ModifyAll"],[209,"ext","codeunit",9999,"SetUpgradeTag",1],[209,"call","GetPaymentOccurrenceRetryStatusUpgradeTag",0]]}]}