---
id: object/codeunit/248
type: object
title: Codeunit 248 "VAT Lookup Ext. Data Hndl"
summary: Codeunit 248 "VAT Lookup Ext. Data Hndl" in Base Application (Microsoft.Finance.VAT.Registration). 1 public procedures, 7 events. Present since at least BC23, still in BC30, changed in BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "30"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 54ebc5d5cd57b5a21f52fdd5058711792c64fb238763112252d44f7d9229a49d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/VAT/Registration/VATLookupExtDataHndl.Codeunit.al
    title: src/Layers/W1/BaseApp/Finance/VAT/Registration/VATLookupExtDataHndl.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11736
    - change/bcapps/11734
    - change/bcapps/11435
object_type: codeunit
object_id: 248
name: VAT Lookup Ext. Data Hndl
namespace: Microsoft.Finance.VAT.Registration
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 16
  events: 7
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 6
  called_by: 2
  implements: 0
---

# Codeunit 248 "VAT Lookup Ext. Data Hndl"

> Codeunit 248 "VAT Lookup Ext. Data Hndl" in Base Application (Microsoft.Finance.VAT.Registration). 1 public procedures, 7 events. Present since at least BC23, still in BC30, changed in BC30.

Base Application · Microsoft.Finance.VAT.Registration · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/VAT/Registration/VATLookupExtDataHndl.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | VAT Registration Log |
| Permissions | TableData "VAT Registration Log" = rimd |

## Events published

- `OnRunOnAfterLookupVatRegistrationFromWebService(var VATRegistrationLog: Record "VAT Registration Log"; var RecVATRegistrationLog: Record "VAT Registration Log")` (integration): Integration event raised after completing VAT registration lookup from web service. Enables custom processing of validation results and log record finalization.
- `OnSendRequestToVatRegistrationServiceOnBeforeSendRequestToWebService(var SOAPWebServiceRequestMgt: Codeunit "SOAP Web Service Request Mgt."; var TempBlobBody: Codeunit "Temp Blob")` (integration): Integration event raised before sending request to VAT registration web service. Enables custom modification of SOAP request configuration and body content.
- `OnSendRequestToVATRegistrationServiceBeforeShowErrors(var VATRegistrationLog: Record "VAT Registration Log"; var IsHandled: Boolean)` (integration): Integration event raised before displaying validation errors to allow custom error handling. Enables custom error processing and messaging when VAT registration service validation fails.
- `OnPrepareSOAPRequestBodyOnBeforeSetAccountDetails(var RecordRef: RecordRef; var VATRegistrationLog: Record "VAT Registration Log"; var AccountName: Text; var AccountStreet: Text; var AccountCity: Text; var AccountPostCode: Text)` (integration): Integration event raised before setting account details in SOAP request body. Enables custom modification of account name, street, city, and post code values sent to VAT service.
- `OnLookupVatRegistrationFromWebServiceOnAfterResponseLogRecordingAndBeforeCommit(VATRegistrationLog: Record "VAT Registration Log"; ShowErrors: Boolean; var SuppressCommit: Boolean)` (integration): Integration event raised after web service response logging and before database commit. Enables custom transaction control and additional processing before finalizing validation results.
- `OnRunOnBeforeLookupVatRegistrationFromWebService(var VATRegistrationLogRec: Record "VAT Registration Log"; var VATRegistrationLog: Record "VAT Registration Log"; var IsHandled: Boolean)` (integration): Integration event raised before starting VAT registration lookup from web service. Enables custom pre-processing and validation logic before web service communication.
- `OnBeforePrepareSOAPRequestBody(var TempBlob: Codeunit "Temp Blob"; VATRegistrationLog: Record "VAT Registration Log"; var IsHandled: Boolean)` (integration): Integration event raised before preparing SOAP request body for VAT validation. Enables complete custom request body preparation and web service communication logic.

## Procedures

- `GetVATRegNrValidationWebServiceURL(): Text[250]`: Retrieves the default URL for the VAT registration number validation web service (VIES).

Plus 8 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 249 "VAT Registration Log"](../table/249.md)

## 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.

- [Codeunit 1290 "SOAP Web Service Request Mgt."](../codeunit/1290.md) (7 calls: `SendRequestToVatRegistrationService → DisableHttpsCheck`, `SendRequestToVatRegistrationService → GetResponseContent`, `SendRequestToVatRegistrationService → ProcessFaultResponse`, …)
- [Codeunit 4100 "Temp Blob"](../codeunit/4100.md) (5 calls: `InsertLogEntry → CreateInStream`, `PrepareSOAPRequestBody → CreateInStream`, `PrepareSOAPRequestBody → CreateOutStream`, …)
- [Codeunit 6224 "XML DOM Management"](../codeunit/6224.md) (3 calls: `InsertLogEntry → LoadXMLDocumentFromInStream`, `PrepareSOAPRequestBody → AddElement`, `PrepareSOAPRequestBody → AddRootElementWithPrefix`)
- [Codeunit 247 "VAT Lookup Quota Mgt."](../codeunit/247.md) (1 call: `SendRequestToVatRegistrationService → (object)`)
- [Codeunit 249 "VAT Registration Log Mgt."](../codeunit/249.md) (1 call: `InsertLogEntry → LogVerification`)
- [Codeunit 701 "Data Type Management"](../codeunit/701.md) (1 call: `GetField → FindFieldByName`)

## Called by

- [Codeunit 249 "VAT Registration Log Mgt."](../codeunit/249.md) (2 calls: `CheckVIESForVATNoField → (object)`, `InitServiceSetup → GetVATRegNrValidationWebServiceURL`)
- [Page 248 "VAT Registration Config"](../page/248.md) (1 call: `InitVATRegNrValidationSetup → GetVATRegNrValidationWebServiceURL`)

## Recent changes

- 2026-09-24 [#11736 [29.x][VIES Integration] Per-environment daily request rate-limit](../../changes/bcapps/11736.md) (releases/29.x, BC29, feature)
- 2026-09-24 [#11734 [VIES Integration] Per-environment daily request rate-limit](../../changes/bcapps/11734.md) (main, BC30, feature)
- 2026-09-18 [#11435 Validate unauthenticated public API responses before use](../../changes/bcapps/11435.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC30

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 Lookup Ext. Data Hndl")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
