{"title":"Codeunit 205 Alt. Cust. VAT Reg. Doc. Impl., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/205-alt-cust-vat-reg-doc-impl/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":205,"name":"Alt. Cust. VAT Reg. Doc. Impl.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/205-alt-cust-vat-reg-doc-impl/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/205-alt-cust-vat-reg-doc-impl/source/","path":"src/Layers/W1/BaseApp/Finance/VAT/Registration/AltCustVATRegDocImpl.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":{"table:36":{"name":"Sales Header","url":"https://jonas-paprotka.de/ref/table/36-sales-header/"},"codeunit:200":{"name":"Alt. Cust. VAT. Reg. Facade","url":"https://jonas-paprotka.de/ref/codeunit/200-alt-cust-vat-reg-facade/"},"codeunit:8703":{"name":"Feature Telemetry","url":"https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/"},"page:205":{"name":"Confirm Alt. Cust. VAT Reg.","url":"https://jonas-paprotka.de/ref/page/205-confirm-alt-cust-vat-reg/"},"table:1518":{"name":"My Notifications","url":"https://jonas-paprotka.de/ref/table/1518-my-notifications/"},"table:98":{"name":"General Ledger Setup","url":"https://jonas-paprotka.de/ref/table/98-general-ledger-setup/"},"table:213":{"name":"Alt. Cust. VAT Reg.","url":"https://jonas-paprotka.de/ref/table/213-alt-cust-vat-reg/"}},"procs":[{"name":"Init","line":40,"kind":"procedure","params":2,"steps":[[44,"validate",36,"Alt. VAT Registration No."],[45,"validate",36,"Alt. Gen. Bus Posting Group"],[46,"validate",36,"Alt. VAT Bus Posting Group"]]},{"name":"CopyFromCustomer","line":49,"kind":"procedure","params":2,"steps":[[53,"call","IsAltVATRegUsed",1],[55,"call","RunChecks",1],[57,"call","GetCustVATCalc",2]]},{"name":"CopyFromCustomer","line":62,"kind":"procedure","access":"local","params":3,"steps":[[71,"call","AddStringToCommaSeparatedList",2],[74,"validate",36,"Alt. VAT Registration No."],[75,"validate",36,"VAT Registration No."],[76,"call","AddStringToCommaSeparatedList",2],[79,"validate",36,"Alt. Gen. Bus Posting Group"],[80,"validate",36,"Gen. Bus. Posting Group"],[81,"call","AddStringToCommaSeparatedList",2],[84,"validate",36,"Alt. VAT Bus Posting Group"],[85,"validate",36,"VAT Bus. Posting Group"],[86,"call","AddStringToCommaSeparatedList",2]]},{"name":"UpdateSetupOnShipToCountryChangeInSalesHeader","line":92,"kind":"procedure","params":2,"steps":[[97,"call","GetCustVATCalc",2],[98,"ext","codeunit",200,"GetAlternativeCustVATReg",3],[99,"validate",36,"VAT Country/Region Code"],[101,"call","CopyFromCustomer",2]]},{"name":"UpdateSetupOnVATCountryChangeInSalesHeader","line":104,"kind":"procedure","params":2,"steps":[[108,"call","AlternativeCustVATRegIsBlank",1],[109,"call","CopyFromCustomer",2],[110,"call","GetCustVATCalc",2],[114,"call","ThrowAddAltCustVATRegNotification",2],[117,"call","RunChecks",1],[119,"call","ConfirmChanges",1],[121,"call","UpdateAltCustVATRegInSalesHeader",1]]},{"name":"UpdateSetupOnBillToCustomerChangeInSalesHeader","line":124,"kind":"procedure","params":3,"steps":[[133,"call","IsAltVATRegUsed",1],[136,"call","CopyFromCustomer",3],[139,"ext","codeunit",200,"GetAlternativeCustVATReg",3],[140,"validate",36,"VAT Country/Region Code"],[143,"ext","codeunit",200,"CopyBillToCustomerToSalesHeader",2]]},{"name":"AlternativeCustVATRegIsBlank","line":151,"kind":"procedure","access":"local","params":1,"steps":[[155,"call","GetAlternativeCustVATReg",2]]},{"name":"GetAlternativeCustVATReg","line":158,"kind":"procedure","access":"local","params":2,"steps":[[163,"call","GetCustVATCalc",2],[164,"ext","codeunit",200,"GetAlternativeCustVATReg",3]]},{"name":"ConfirmChanges","line":167,"kind":"procedure","access":"local","params":1,"steps":[[172,"ext","codeunit",8703,"LogUsage",3],[173,"call","BuildFieldChangeBuffer",2],[177,"ext","table",36,"GetHideValidationDialog",0],[179,"call","ShowConfirmation",0],[181,"ext","page",205,"SetUIControls",3],[182,"ext","page",205,"SetSource",1],[184,"ext","page",205,"DontShowAgainOptionSelected",0],[185,"call","DisableConfirmation",0]]},{"name":"ShowConfirmation","line":189,"kind":"procedure","access":"local","params":0,"steps":[[195,"ext","table",1518,"IsEnabled",1],[195,"call","GetConfirmChangesNotificationId",0]]},{"name":"DisableConfirmation","line":198,"kind":"procedure","access":"local","params":0,"steps":[[202,"ext","table",1518,"Disable",1],[202,"call","GetConfirmChangesNotificationId",0],[203,"ext","table",1518,"InsertDefault",4],[203,"call","GetConfirmChangesNotificationId",0]]},{"name":"UpdateAltCustVATRegInSalesHeader","line":206,"kind":"procedure","access":"local","params":1,"steps":[[210,"call","GetAlternativeCustVATReg",2],[212,"ext","codeunit",200,"CopyAltCustVATRegToSalesHeader",2],[214,"ext","codeunit",8703,"LogUptake",3]]},{"name":"BuildFieldChangeBuffer","line":217,"kind":"procedure","access":"local","params":2,"steps":[[221,"call","GetAlternativeCustVATReg",2],[222,"ext","codeunit",200,"AddTempChangeLogEntryForAltCustVATRegChanges",3]]},{"name":"RunChecks","line":226,"kind":"procedure","access":"local","params":1,"steps":[[228,"call","CheckPrepayment",1],[229,"call","CheckPartialPosting",1]]},{"name":"GetCustVATCalc","line":254,"kind":"procedure","access":"local","params":2,"steps":[[258,"ext","table",98,"GetRecordOnce",0]]},{"name":"ThrowAddAltCustVATRegNotification","line":283,"kind":"procedure","access":"local","params":2,"steps":[[289,"ext","table",1518,"IsEnabled",1],[289,"call","AddAltCustVATRegNotificationId",0],[291,"call","AddAltCustVATRegNotificationId",0]]},{"name":"AddAltCustVATRegFromNotification","line":300,"kind":"procedure","params":1,"steps":[[309,"validate",213,"Id"],[310,"validate",213,"Customer No."],[312,"validate",213,"VAT Country/Region Code"],[314,"write",213,"Insert",1]]},{"name":"DisableAddAltCustVATRegNotification","line":319,"kind":"procedure","params":1,"steps":[[323,"ext","table",1518,"Disable",1],[324,"ext","table",1518,"InsertDefault",4]]}]}