Codeunit 249 "VAT Registration Log Mgt."
Base Application · Microsoft.Finance.VAT.Registration
Across versions
- BC23-24present
- BC251 procedures added
- BC26-29unchanged
- BC303 procedures added
Neighbourhood 11 connected objects and pages
Base Application · Microsoft.Finance.VAT.Registration · BC23-30 · source at 4e6a307c · facts from BC29
Properties
| Property | Value |
|---|---|
| Permissions | TableData “VAT Registration Log” = rimd |
Events published
OnAfterInsertVATRegistrationLog(var VATRegistrationLog: Record "VAT Registration Log")(integration): Integration event raised after creating VAT registration log entry.OnAssistEditContactVATRegOnBeforeRunPageVATRegistrationLog(var VATRegistrationLog: Record "VAT Registration Log"; Contact: Record Contact)(integration): Integration event raised before opening VAT registration log page for contact.OnAssistEditCustomerVATRegOnBeforeRunPageVATRegistrationLog(var VATRegistrationLog: Record "VAT Registration Log"; Customer: Record Customer)(integration): Integration event raised before opening VAT registration log page for customer.OnAssistEditVendorVATRegOnBeforeRunPageVATRegistrationLog(var VATRegistrationLog: Record "VAT Registration Log"; Vendor: Record Vendor)(integration): Integration event raised before displaying VAT registration log page for vendor VAT assist edit operations.OnBeforeUpdateRecordFromVATRegLog(var RecordRef: RecordRef; RecordVariant: Variant; VATRegistrationLog: Record "VAT Registration Log"; var IsHandled: Boolean)(integration): Integration event raised before updating a record with validated data from VAT registration log.OnBeforeCheckVIESForVATNoField(var RecordRef: RecordRef; var VATRegistrationLog: Record "VAT Registration Log"; RecordVariant: Variant; EntryNo: Code[20]; CountryCode: Code[10]; AccountType: Option; var VATNoFieldName: Text; var IsHandled: Boolean)(integration): Integration event raised before checking VIES validation for a VAT number field to allow custom field identification.OnBeforeInsertValidLogVerification(var VatRegistrationLog: Record "VAT Registration Log")(integration): Integration event raised before inserting a valid VAT registration log verification entry.OnBeforeInsertInvalidLogVerification(var VatRegistrationLog: Record "VAT Registration Log")(integration): Integration event raised before inserting an invalid VAT registration log verification entry.OnBeforeValidateVATRegNoWithVIES(var RecordRef: RecordRef; RecordVariant: Variant; EntryNo: Code[20]; CountryCode: Code[10]; AccountType: Option; var IsHandled: Boolean)(integration): Integration event raised before validating VAT registration number with VIES service to allow custom validation logic.
Event subscriptions
- HandleViesRegisterServiceConnection subscribes to Table “Service Connection” OnRegisterServiceConnection
Procedures
LogCustomer(Customer: Record Customer): Creates VAT registration log entry for customer and initiates validation if service is enabled.LogVendor(Vendor: Record Vendor): Creates VAT registration log entry for vendor and initiates validation if service is enabled.LogContact(Contact: Record Contact): Creates VAT registration log entry for contact and initiates validation if service is enabled.LogVerification(var VATRegistrationLog: Record "VAT Registration Log"; XMLDoc: DotNet XmlDocument; Namespace: Text)DeleteCustomerLog(Customer: Record Customer): Deletes all VAT registration log entries associated with the specified customer.DeleteVendorLog(Vendor: Record Vendor): Deletes all VAT registration log entries associated with the specified vendor.DeleteContactLog(Contact: Record Contact): Deletes all VAT registration log entries associated with the specified contact.AssistEditCustomerVATReg(Customer: Record Customer): Opens VAT registration log page for customer with validation and logging capabilities.CheckIfCountryCodeIsSet(Customer: Record Customer): Validates that customer has country/region code set when VAT registration service is enabled.AssistEditVendorVATReg(Vendor: Record Vendor): Opens VAT registration log page for vendor with validation and logging capabilities.AssistEditContactVATReg(Contact: Record Contact): Opens VAT registration log page for contact with validation and logging capabilities.AssistEditCompanyInfoVATReg(): Opens VAT registration log page for company information with validation and logging capabilities.CheckVIESForVATNo(var RecordRef: RecordRef; var VATRegistrationLog: Record "VAT Registration Log"; RecordVariant: Variant; EntryNo: Code[20]; CountryCode: Code[10]; AccountType: Option): Validates VAT registration number against VIES service for EU countries.CheckVIESForVATNoField(var RecordRef: RecordRef; var VATRegistrationLog: Record "VAT Registration Log"; RecordVariant: Variant; EntryNo: Code[20]; CountryCode: Code[10]; AccountType: Option; VATNoFieldName: Text): Validates VAT registration number against VIES service for EU countries with custom field name.UpdateRecordFromVATRegLog(var RecordRef: RecordRef; RecordVariant: Variant; VATRegistrationLog: Record "VAT Registration Log"): Updates business entity record with validated VAT registration information from VIES response.InitServiceSetup(): Initializes VAT registration number service configuration with default settings.SetupService(): Opens configuration page for VAT registration number service setup.EnableService(): Enables VAT registration number validation service if not already configured.ValidateVATRegNoWithVIES(var RecordRef: RecordRef; RecordVariant: Variant; EntryNo: Code[20]; AccountType: Option; CountryCode: Code[10]): Validates VAT registration number with VIES service and displays validation results.GetServiceDisclaimerUR(): Text: Returns URL for VAT registration service disclaimer information.
Plus 7 local procedures.
Triggers
OnRun
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Page 249 “VAT Registration Log” (4 calls:
AssistEditCompanyInfoVATReg → (object),AssistEditContactVATReg → (object),AssistEditCustomerVATReg → (object), …) - Codeunit 701 “Data Type Management” (3 calls:
CheckVIESForVATNoField → FindFieldByName,CheckVIESForVATNoField → GetRecordRef,UpdateRecordFromVATRegLog → GetRecordRef) - Codeunit 248 “VAT Lookup Ext. Data Hndl” (2 calls:
CheckVIESForVATNoField → (object),InitServiceSetup → GetVATRegNrValidationWebServiceURL) - Codeunit 6224 “XML DOM Management” (2 calls:
ExtractValue → FindNodeWithNamespace,LogVerification → FindNodeWithNamespace) - Codeunit 4030 “Client Type Management” (1 call:
IsAPIClientType → GetCurrentClientType)
Called by
- Table 18 “Customer” (3 calls:
OnDelete → DeleteCustomerLog,VATRegistrationValidation → LogCustomer,VATRegistrationValidation → ValidateVATRegNoWithVIES) - Table 23 “Vendor” (3 calls:
OnDelete → DeleteVendorLog,VATRegistrationValidation → LogVendor,VATRegistrationValidation → ValidateVATRegNoWithVIES) - Table 5050 “Contact” (3 calls:
OnDelete → DeleteContactLog,VATRegistrationValidation → LogContact,VATRegistrationValidation → ValidateVATRegNoWithVIES) - Codeunit 5055 “CustVendBank-Update” (2 calls:
UpdateCustomer → LogCustomer,UpdateVendor → LogVendor) - Table 213 “Alt. Cust. VAT Reg.” (2 calls:
VATRegistrationValidation → LogCustomer,VATRegistrationValidation → ValidateVATRegNoWithVIES) - Codeunit 2 “Company-Initialize” (1 call:
OnRun → InitServiceSetup) - Codeunit 248 “VAT Lookup Ext. Data Hndl” (1 call:
InsertLogEntry → LogVerification)
Recent changes
- 2026-09-21 #11657 Fix VIES integrity check: tolerate country-code prefix on echoed VAT number (uptake fix) (main, BC30, fix)
- 2026-09-18 #11435 Validate unauthenticated public API responses before use (main, BC30, fix)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Validate VAT Registration Numbers — possibly related: VAT Registration Log manages validation and logging of VAT registration numbers via VIES. (model-linked)
- VAT Registration No. Check (Report) — possibly related: Logs VAT registration validation results and identifies duplicate registration numbers. (model-linked)
Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "VAT Registration Log Mgt."), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.