import { Callout } from "zudoku/ui/Callout";

# Address Validation Setup Reference

Table `5523603` `bdev.Address Validation Setup` carries one configuration row for the whole tenant.

Almost every field is `Access = Public`, so another extension can read the configuration without going through a page.

```pascal
    setup: Record "bdev.Address Validation Setup";
    setup.Get();
```

<Callout type="caution" title="Read-only from outside">
Reading these fields is supported. Writing them from another extension is not: the setup page is the only supported way to change them, and a direct write from code bypasses whatever consistency checks the setup page or the install/upgrade logic rely on.
</Callout>

## Address validation

| No. | Field | Type | Description |
| --- | ----- | ---- | ----------- |
| 10 | `Address Validation enabled` | Boolean | Master switch for automatic validation on modify. Off switches off every table below regardless of its own field. |
| 40 | `Address Validation Scope` | Option (`All`, `UI only`, `Non-UI only`) | Restricts automatic validation to sessions with a user interface, to sessions without one, or lets it run in both. |
| 19 | `Address Verification` | Boolean | Whether the service call itself runs, as opposed to only the field-level checks around it. |
| 11 | `Contact Addr. Validation` | Boolean | Automatic validation for `Contact`. |
| 12 | `Customer Addr. Validation` | Boolean | Automatic validation for `Customer`. |
| 13 | `Vendor Addr. Validation` | Boolean | Automatic validation for `Vendor`. |
| 14 | `Alt. Addr. Validation` | Boolean | Automatic validation for `Alternative Address`. |
| 15 | `Order Addr. Validation` | Boolean | Automatic validation for `Order Address`. |
| 16 | `Ship-To Addr. Validation` | Boolean | Automatic validation for `Ship-to Address`. |
| 17 | `Sales Addr. Validation` | Boolean | Automatic validation for the sell-to, ship-to and bill-to addresses of `Sales Header`. |
| 18 | `Purch. Addr. Validation` | Boolean | Automatic validation for the buy-from, pay-to and ship-to addresses of `Purchase Header`. |
| 41 | `Resource Addr. Validation` | Boolean | Automatic validation for `Resource`, switched off by default. |
| 42 | `Employee Addr. Validation` | Boolean | Automatic validation for `Employee`, switched off by default. |

<Callout type="info" title="Resource and Employee are fields of their own">
`Resource Addr. Validation` and `Employee Addr. Validation` each control automatic validation for `Resource` and `Employee` independently of the other per-table switches. Set either to `true` to have those addresses checked on modify the same way customer or vendor addresses are.
</Callout>

## Address prediction

| No. | Field | Type | Description |
| --- | ----- | ---- | ----------- |
| 20 | `Address Prediction enabled` | Boolean | Master switch for the type-ahead. Off switches off every table below regardless of its own field. |
| 21 | `Max. No. of Predictions` | Integer | How many suggestions the type-ahead shows at once. Between 1 and 10, default 4. |
| 22 | `Contact Addr. Prediction` | Boolean | Type-ahead for `Contact`. |
| 23 | `Customer Addr. Prediction` | Boolean | Type-ahead for `Customer`. |
| 24 | `Vendor Addr. Prediction` | Boolean | Type-ahead for `Vendor`. |
| 25 | `Employee Addr. Prediction` | Boolean | Type-ahead for `Employee`. |
| 26 | `Resource Addr. Prediction` | Boolean | Type-ahead for `Resource`. |
| 27 | `Sales Doc. Addr. Prediction` | Boolean | Type-ahead for sales quotes and orders. |
| 28 | `Purch. Doc. Addr. Prediction` | Boolean | Type-ahead for purchase quotes and orders. |
| 29 | `Ship-To Addr. Prediction` | Boolean | Type-ahead for `Ship-to Address`. |

## User interface

| No. | Field | Type | Description |
| --- | ----- | ---- | ----------- |
| 30 | `Address Field Deco. Enabled` | Boolean | Whether address fields that are not validated or that are ambiguous are highlighted on cards and documents. |
| 31 | `Address Field Decoration` | Enum "Cues And KPIs Style" | The highlight style used when decoration is enabled. |

## Address data initialization

| No. | Field | Type | Description |
| --- | ----- | ---- | ----------- |
| 101 | `Initialization Batch Size` | Integer | Rows processed per batch when the address directory is initialized. 0 or lower falls back to the built-in default of 1,000. Between 0 and 100,000. |

<Callout type="caution" title="Initialized and Initialization Pct. Completed are internal">
Fields `99` (`Initialized`) and `100` (`Initialization Pct. Completed`) are `Access = Internal`. They drive the progress controls on the setup page but are not part of the surface another extension can read.
</Callout>

## See also

- [365 business Address Validation - Overview](readme.mdx)
- [Address Validation API](address-validation-api.mdx)
- [Extensibility Events](extensibility-events.mdx)
- [Documentation - 365 business Address Validation](../../en-us/365-business-address-validation/index.mdx)
