---
id: object/codeunit/27021-mx
type: object
title: Codeunit 27021 "DIOT Data Management" (MX)
summary: Codeunit 27021 "DIOT Data Management" (MX) in the MX country layer (Microsoft.Finance.VAT.Reporting). 17 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - mx layer
versions:
  introduced: "29"
  last_changed: null
  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: c95f54f77a24decd88b33bdd17552072b046bc27fb5e7ff7afd27105b676608f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/NA/MX_DIOT/app/src/Processing/DIOTDataManagement.Codeunit.al
    title: src/Apps/NA/MX_DIOT/app/src/Processing/DIOTDataManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/mx
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 27021
name: DIOT Data Management
namespace: Microsoft.Finance.VAT.Reporting
app: MX_DIOT
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
country: MX
counts:
  fields: 0
  procedures: 30
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 27021 "DIOT Data Management" (MX)

> Codeunit 27021 "DIOT Data Management" (MX) in the MX country layer (Microsoft.Finance.VAT.Reporting). 17 public procedures. Introduced in BC29, still in BC30.

MX country layer · Microsoft.Finance.VAT.Reporting · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/NA/MX_DIOT/app/src/Processing/DIOTDataManagement.Codeunit.al) · facts from BC29

An object of the [MX localization](../../localizations/mx.md), not part of W1.

## Procedures

- `GetTypeOfOperationCode(TypeOfOperation: Enum "DIOT Type of Operation"): Text[2]`
- `InsertDefaultDIOTConcepts()`
- `GetDIOTSetupGuideTxt(): Text[250]`
- `GetWHTConceptNo(): Integer`
- `GetConceptCount(): Integer`
- `GetVendorNameLength(): Integer`
- `GetNationalityLength(): Integer`
- `GetMXCountryCode(): Code[10]`
- `IsCountryCodeMXorBlank(CountryRegionCode: Code[10]): Boolean`
- `RemoveUnwantedCharacters(InputString: Text; SpecialCharactersAllowed: Text): Text`
- `ConvertToDIOTCountryCode(CountryCode: Code[10]): Text[10]`
- `CollectDIOTDataSet(var TempDIOTReportBuffer: Record "DIOT Report Buffer" temporary; var TempDIOTReportVendorBuffer: Record "DIOT Report Vendor Buffer" temporary; var TempErrorMessage: Record "Error Message" temporary; StartingDate: Date; EndingDate: Date)`
- `GetAssistedSetupComplete(): Boolean`
- `SetAssistedSetupComplete()`
- `GetNationalyForCountryCode(CountryRegionCode: Code[2]): Text`
- `GenerateDIOTFile(var TempDIOTReportBuffer: Record "DIOT Report Buffer" temporary; var TempDIOTReportVendorBuffer: Record "DIOT Report Vendor Buffer" temporary; var TempBLOB: Codeunit "Temp Blob")`
- `WriteDIOTFile(var TempDIOTReportBuffer: Record "DIOT Report Buffer" temporary; var TempDIOTReportVendorBuffer: Record "DIOT Report Vendor Buffer" temporary)`

Plus 13 local procedures.

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

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). 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: "DIOT Data Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.

A MX country object, not part of W1: the default corpus does not have it; `bcatlas_list_countries` shows which countries the atlas has.
