---
id: object/codeunit/10
type: object
title: Codeunit 10 "Type Helper"
summary: Codeunit 10 "Type Helper" in Base Application (System.Reflection). 77 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24-26, BC29.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "29"
  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: 205796ec0fddf5f27ed9d65a511d296ead7e76c0892811163a3ef3c9870c87e1
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/Utilities/TypeHelper.Codeunit.al
    title: src/Layers/W1/BaseApp/System/Utilities/TypeHelper.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/11507
    - change/bcapps/11160
    - change/bcapps/8951
object_type: codeunit
object_id: 10
name: Type Helper
namespace: System.Reflection
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "26"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 85
  events: 2
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 9
  called_by: 121
  implements: 0
---

# Codeunit 10 "Type Helper"

> Codeunit 10 "Type Helper" in Base Application (System.Reflection). 77 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24-26, BC29.

Base Application · System.Reflection · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/Utilities/TypeHelper.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Permissions | tabledata "Field" = r |

## Events published

- `OnBeforeGetFieldLength(var Field: Record "Field"; var FieldLength: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeGetField(TableNo: Integer; FieldNo: Integer; var Field: Record "Field"; var Result: Boolean; var IsHandled: Boolean)` (integration)

## Procedures

- `Evaluate(var Variable: Variant; String: Text; Format: Text; CultureName: Text): Boolean`
- `GetLocalizedMonthToInt(Month: Text): Integer`
- `CompareDateTime(DateTimeA: DateTime; DateTimeB: DateTime): Integer`
- `FormatDate(DateToFormat: Date; LanguageId: Integer): Text`
- `FormatDate(DateToFormat: Date; Format: Text; CultureName: Text): Text`
- `FormatDateWithCurrentCulture(DateToFormat: Date): Text`
- `GetHMSFromTime(var Hour: Integer; var Minute: Integer; var Second: Integer; TimeSource: Time)`
- `IsLeapYear(Date: Date): Boolean`
- `GetOptionNo(Value: Text; OptionString: Text): Integer`
- `GetOptionNoFromTableField(Value: Text; TableNo: Integer; FieldNo: Integer): Integer`
- `GetNumberOfOptions(OptionString: Text): Integer`
- `OptionsAreEqual(Value: Text; CurrentOption: Text): Boolean`
- `IsNumeric(Text: Text): Boolean`
- `GetField(TableNo: Integer; FieldNo: Integer; var Field: Record "Field"): Boolean`
- `GetFieldLength(TableNo: Integer; FieldNo: Integer): Integer`
- `TestFieldIsNotObsolete(Field: Record "Field")`
- `IsPhoneNumber(Input: Text): Boolean`
- `GetUserTimezoneOffset(var Duration: Duration): Boolean`
- `GetUserClientTypeOffset(var Duration: Duration)`
- `GetTimezoneOffset(var Duration: Duration; TimeZoneID: Text)`
- `EvaluateUnixTimestamp(Timestamp: BigInteger): DateTime`
- `EvaluateUTCDateTime(DateTimeText: Text): DateTime`
- `FormatDateTime(FormattingDateTime: DateTime; Format: Text; CultureName: Text): Text`
- `FormatUtcDateTime(DateTime: DateTime; DataFormat: Text; DataFormattingCulture: Text): Text`
- `GetCurrUTCDateTime(): DateTime`
- `GetCurrUTCDateTimeAsText(): Text`
- `GetCurrUTCDateTimeISO8601(): Text`
- `AddHoursToDateTime(SourceDateTime: DateTime; NoOfHours: Integer): DateTime`
- `FormatDecimal(Decimal: Decimal; DataFormat: Text; DataFormattingCulture: Text): Text`
- `UrlEncode(var Value: Text): Text`
- `UrlEncode(var Value: SecretText): SecretText`
- `UrlEncodeSecret(var Value: Text): Text` (obsolete 27.0: Use UrlEncode with secret text.)
- `UrlDecode(var Value: Text): Text`
- `HtmlEncode(var Value: Text): Text`
- `HtmlDecode(var Value: Text): Text`
- `JavaScriptStringEncode(Value: Text): Text`
- `JavaScriptStringEncode(Value: Text; AddDoubleQuotes: Boolean): Text`
- `UriEscapeDataString(Value: Text): Text`
- `UriGetAuthority(Value: Text): Text`
- `GetKeyAsString(RecordVariant: Variant; KeyIndex: Integer): Text`
- `ReadAsTextWithSeparator(InStream: InStream; LineSeparator: Text): Text`
- `TryReadAsTextWithSeparator(InStream: InStream; LineSeparator: Text; var Content: Text)`
- `TryReadAsTextWithSepAndFieldErrMsg(InStream: InStream; LineSeparator: Text; FieldCaption: Text): Text`
- `CRLFSeparator(): Text[2]`
- `LFSeparator(): Text[1]`
- `SortRecordRef(var RecRef: RecordRef; CommaSeparatedFieldsToSort: Text; Ascending: Boolean)`
- `TextDistance(Text1: Text; Text2: Text): Integer`
- `NewLine(): Text`
- `GetMaxNumberOfParametersInSQLQuery(): Integer`
- `BitwiseAnd(A: Integer; B: Integer): Integer`
- `BitwiseOr(A: Integer; B: Integer): Integer`
- `BitwiseXor(A: Integer; B: Integer): Integer`
- `GetFormattedCurrentDateTimeInUserTimeZone(StringFormat: Text): Text`
- `GetCurrentDateTimeInUserTimeZone(): DateTime`
- `GetInputDateTimeInUserTimeZone(InputDateTime: DateTime): DateTime`
- `ConvertDateTimeFromUTCToTimeZone(InputDateTime: DateTime; TimeZoneTxt: Text): DateTime`: NOTE: The procedure's name is incorrect. This procedure converts the time from current client timezone to target timezone, instead of converting from utc to target time zone.
- `ConvertDateTimeFromInputTimeZoneToClientTimezone(InputDateTime: DateTime; TimeZoneTxt: Text): DateTime`: Convert the datetime from the specified timezone to current client's timezone.
- `IntToHex(IntValue: Integer): Text`
- `Maximum(Value1: Decimal; Value2: Decimal): Decimal`
- `Minimum(Value1: Decimal; Value2: Decimal): Decimal`
- `TransferFieldsWithValidate(var TempFieldBuffer: Record "Field Buffer" temporary; RecordVariant: Variant; var TargetTableRecRef: RecordRef)`
- `CalculateLog(Number: Decimal): Decimal`
- `GetAmountFormatLCYWithUserLocale(): Text`
- `GetAmountFormatLCYWithUserLocale(DecimalPlaces: Integer): Text`
- `GetAmountFormatWithUserLocale(CurrencySymbol: Text[10]): Text`
- `GetAmountFormatWithUserLocale(CurrencySymbol: Text[10]; DecimalPlaces: Integer): Text`
- `GetAmountFormat(LocaleId: Integer; CurrencySymbol: Text[10]): Text`
- `GetAmountFormat(LocaleId: Integer; CurrencySymbol: Text[10]; DecimalPlaces: Integer): Text`
- `GetAmountFormatDecimalPlaces(LocaleId: Integer; CurrencySymbol: Text[10]; DecimalPlaces: Integer): Text`
- `GetDefaultAmountFormat(): Text` (internal)
- `GetDefaultAmountFormat(DecimalPlaces: Integer): Text` (internal)
- `GetXMLAmountFormatWithTwoDecimalPlaces(): Text`
- `GetXMLDateFormat(): Text`
- `CopyRecVariantToRecRef(RecordVariant: Variant; var RecRef: RecordRef)`
- `IsLatinLetter(ch: Char): Boolean`
- `IsDigit(ch: Char): Boolean`
- `IsUpper(ch: Char): Boolean`

Plus 6 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.

- [Codeunit 3003 "DotNet_DateTime"](../codeunit/3003.md) (16 calls: `FormatDate → (object)`, `FormatDate → ToString`, `TryEvaluateDate → Day`, …)
- [Codeunit 3002 "DotNet_CultureInfo"](../codeunit/3002.md) (5 calls: `FormatDate → DateTimeFormat`, `FormatDate → GetCultureInfoById`, `TryEvaluateDate → GetCultureInfoByName`, …)
- [Codeunit 3004 "DotNet_DateTimeStyles"](../codeunit/3004.md) (2 calls: `TryEvaluateDate → (object)`, `TryEvaluateDateTime → (object)`)
- [Codeunit 3006 "DotNet_DateTimeOffset"](../codeunit/3006.md) (2 calls: `GetTimezoneOffset → GetOffset`, `TryEvaluateDate → DateTime`)
- [Codeunit 701 "Data Type Management"](../codeunit/701.md) (2 calls: `GetKeyAsString → GetRecordRef`, `TransferFieldsWithValidate → GetRecordRef`)
- [Codeunit 3005 "DotNet_XMLConvert"](../codeunit/3005.md) (1 call: `TryEvaluateDate → ToDateTimeOffset`)
- [Codeunit 3960 "Regex"](../codeunit/3960.md) (1 call: `IsPhoneNumber → IsMatch`)
- [Codeunit 4030 "Client Type Management"](../codeunit/4030.md) (1 call: `GetUserClientTypeOffset → GetCurrentClientType`)
- [Codeunit 43 "Language"](../codeunit/43.md) (1 call: `FormatDateWithCurrentCulture → GetUserLanguageTag`)

## Called by

- [Codeunit 20132 "Script Data Type Mgmt."](../codeunit/20132.md) (13 calls: `CheckConstantDatatype → IsNumeric`, `ConvertText2Type → GetOptionNo`, `EvaluateDate → Evaluate`, …)
- [Codeunit 1890 "Reminder Communication"](../codeunit/1890.md) (7 calls: `OnReplaceHTMLText → LFSeparator`, `OnReplaceHTMLText → TryReadAsTextWithSeparator`, `SelectEmailBodyText → LFSeparator`, …)
- [Table 444 "IC API Log"](../table/444.md) (6 calls: `GetRequestBodyAsText → LFSeparator`, `GetRequestBodyAsText → ReadAsTextWithSeparator`, `GetRequestURIAsText → LFSeparator`, …)
- [Codeunit 5458 "Graph Collection Mgt - Contact"](../codeunit/5458.md) (4 calls: `ConcatenateStreet → CRLFSeparator`, `GetContactComments → CRLFSeparator`, `InsertNextContactCommentLine → CRLFSeparator`, …)
- [Codeunit 5477 "Sales Invoice Aggregator"](../codeunit/5477.md) (4 calls: `PropagateOnInsert → TransferFieldsWithValidate`, `PropagateOnModifyToSalesHeader → TransferFieldsWithValidate`, `PropagateOnModifyToSalesInvoiceHeader → TransferFieldsWithValidate`, …)
- [Codeunit 8611 "Config. Package Management"](../codeunit/8611.md) (4 calls: `GetCachedConfigPackageField → GetField`, `IsBLOBField → GetField`, `IsMediaField → GetField`, …)
- [Codeunit 8617 "Config. Validate Management"](../codeunit/8617.md) (4 calls: `EvaluateValueToCode → TestFieldIsNotObsolete`, `EvaluateValueToText → TestFieldIsNotObsolete`, `GetRelationInfoByIDs → TestFieldIsNotObsolete`, …)
- [Table 1235 "XML Buffer"](../table/1235.md) (4 calls: `GetValue → LFSeparator`, `GetValue → ReadAsTextWithSeparator`, `ReadFromBlob → CRLFSeparator`, …)
- [Table 1236 "JSON Buffer"](../table/1236.md) (4 calls: `GetValue → LFSeparator`, `GetValue → ReadAsTextWithSeparator`, `ReadFromBlob → CRLFSeparator`, …)
- [Table 1834 "Consolidation Log Entry"](../table/1834.md) (4 calls: `GetRequestAsText → LFSeparator`, `GetRequestAsText → ReadAsTextWithSeparator`, `GetResponseAsText → LFSeparator`, …)
- [Table 6906 "Expense Report Header"](../table/6906.md) (4 calls: `GetApproverComment → LFSeparator`, `GetApproverComment → TryReadAsTextWithSepAndFieldErrMsg`, `GetSubmitterComment → LFSeparator`, …)
- [Codeunit 20105 "AMC Banking Mgt."](../codeunit/20105.md) (3 calls: `GetFieldValue → GetXMLAmountFormatWithTwoDecimalPlaces`, `SetFieldValue → Evaluate`, `SetFieldValue → GetOptionNoFromTableField`)
- [Codeunit 20365 "Use Case Archival Mgmt."](../codeunit/20365.md) (3 calls: `ImportTaxTypes → ReadAsTextWithSeparator`, `ImportUseCases → ReadAsTextWithSeparator`, `RestoreArchivalToUse → ReadAsTextWithSeparator`)
- [Codeunit 5261 "Audit File Export Mgt."](../codeunit/5261.md) (3 calls: `CompleteAuditFileExportLine → GetCurrentDateTimeInUserTimeZone`, `StartExport → GetCurrentDateTimeInUserTimeZone`, `UpdateExportStatus → GetCurrentDateTimeInUserTimeZone`)
- [Codeunit 5496 "Graph Mgt - Sales Order Buffer"](../codeunit/5496.md) (3 calls: `PropagateOnInsert → TransferFieldsWithValidate`, `PropagateOnModify → TransferFieldsWithValidate`, `TransferSalesInvoiceLineAggregateToSalesLine → TransferFieldsWithValidate`)
- [Codeunit 5497 "Graph Mgt - Purch Order Buffer"](../codeunit/5497.md) (3 calls: `PropagateOnInsert → TransferFieldsWithValidate`, `PropagateOnModify → TransferFieldsWithValidate`, `TransferPurchaseInvoiceLineAggregateToPurchaseLine → TransferFieldsWithValidate`)
- [Codeunit 5503 "Graph Mgt - Attachment Buffer"](../codeunit/5503.md) (3 calls: `FindParentDocumentSafe → Evaluate`, `TransferToIncomingDocumentAttachment → TransferFieldsWithValidate`, `TransferToUnlinkedAttachment → TransferFieldsWithValidate`)
- [Codeunit 5506 "Graph Mgt - Sales Quote Buffer"](../codeunit/5506.md) (3 calls: `PropagateOnInsert → TransferFieldsWithValidate`, `PropagateOnModify → TransferFieldsWithValidate`, `TransferSalesInvoiceLineAggregateToSalesLine → TransferFieldsWithValidate`)
- [Codeunit 5508 "Graph Mgt - Sal. Cr. Memo Buf."](../codeunit/5508.md) (3 calls: `PropagateOnInsert → TransferFieldsWithValidate`, `PropagateOnModify → TransferFieldsWithValidate`, `TransferSalesCreditMemoLineAggregateToSalesLine → TransferFieldsWithValidate`)
- [Codeunit 5511 "Graph Mgt - Purch. Cr. Memo"](../codeunit/5511.md) (3 calls: `PropagateOnInsert → TransferFieldsWithValidate`, `PropagateOnModify → TransferFieldsWithValidate`, `TransferPurchaseCreditMemoLineAggregateToPurchaseLine → TransferFieldsWithValidate`)
- [Codeunit 7233 "Master Data Management"](../codeunit/7233.md) (3 calls: `HandleOnIsModifiedAfterIntegrationTableRecordLastSynch → CompareDateTime`, `HandleOnIsRecordModifiedAfterRecordLastSynch → CompareDateTime`, `HandleOnIsRecordRefModifiedAfterRecordLastSynch → CompareDateTime`)
- [Codeunit 8610 "Questionnaire Management"](../codeunit/8610.md) (3 calls: `BuildAnswerOption → GetField`, `ModifyConfigQuestionAnswer → GetOptionNo`, `UpdateInsertQuestionFields → GetField`)
- [Codeunit 1180 "Data Privacy Mgmt"](../codeunit/1180.md) (2 calls: `CreatePackageFilter → GetField`, `IsValidField → GetField`)
- [Codeunit 1297 "Http Web Request Mgt."](../codeunit/1297.md) (2 calls: `AddSecurityProtocol → BitwiseAnd`, `AddSecurityProtocol → BitwiseOr`)
- [Codeunit 1917 "MigrationQB Helper Functions"](../codeunit/1917.md) (2 calls: `WriteTextToField → Evaluate`, `WriteTextToField → GetOptionNo`)
- [Codeunit 2114 "O365 HTML Templ. Mgt."](../codeunit/2114.md) (2 calls: `EncodeMessage → HtmlEncode`, `FillParameterValueEncoded → HtmlEncode`)
- [Codeunit 491 "Memory Mapped File"](../codeunit/491.md) (2 calls: `ReadTextWithSeparatorsFromMemoryMappedFile → LFSeparator`, `ReadTextWithSeparatorsFromMemoryMappedFile → ReadAsTextWithSeparator`)
- [Codeunit 5520 "Get Unplanned Demand"](../codeunit/5520.md) (2 calls: `SetFilterToSpecificJob → GetMaxNumberOfParametersInSQLQuery`, `SetFilterToSpecificSalesOrder → GetMaxNumberOfParametersInSQLQuery`)
- [Codeunit 7314 "Warehouse Availability Mgt."](../codeunit/7314.md) (2 calls: `CalcQtyAvailToTakeOnWhseWorksheetLine → Maximum`, `CalcQtyAvailToTakeOnWhseWorksheetLine → Minimum`)
- [Codeunit 8400 "Record Set Management"](../codeunit/8400.md) (2 calls: `SortAscending → GetKeyAsString`, `SortAscending → SortRecordRef`)
- [Codeunit 8614 "Config. XML Exchange"](../codeunit/8614.md) (2 calls: `CreateRecordNodes → GetField`, `FormatFieldValue → FormatDate`)
- [Table 110 "Sales Shipment Header"](../table/110.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 112 "Sales Invoice Header"](../table/112.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 114 "Sales Cr.Memo Header"](../table/114.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 1170 "User Task"](../table/1170.md) (2 calls: `GetDescription → LFSeparator`, `GetDescription → ReadAsTextWithSeparator`)
- [Table 1214 "Intermediate Data Import"](../table/1214.md) (2 calls: `GetValue → LFSeparator`, `GetValue → ReadAsTextWithSeparator`)
- [Table 1221 "Data Exch. Field"](../table/1221.md) (2 calls: `GetValue → LFSeparator`, `GetValue → ReadAsTextWithSeparator`)
- [Table 1513 "Notification Schedule"](../table/1513.md) (2 calls: `CalculateClientTimeFromRecTimezone → ConvertDateTimeFromInputTimeZoneToClientTimezone`, `CalculateRecipientDateTime → ConvertDateTimeFromUTCToTimeZone`)
- [Table 20140 "Lookup Field Filter"](../table/20140.md) (2 calls: `ValidateValue → GetOptionNo`, `ValidateValue → IsNumeric`)
- [Table 36 "Sales Header"](../table/36.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 5050 "Contact"](../table/5050.md) (2 calls: `GetTimeZoneOffset → GetUserTimezoneOffset`, `MarkContactsWithSimilarName → TextDistance`)
- [Table 5107 "Sales Header Archive"](../table/5107.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 5331 "CRM Integration Record"](../table/5331.md) (2 calls: `IsModifiedAfterLastSynchonizedCRMRecord → CompareDateTime`, `IsModifiedAfterLastSynchronizedRecord → CompareDateTime`)
- [Table 5900 "Service Header"](../table/5900.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 5990 "Service Shipment Header"](../table/5990.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 5992 "Service Invoice Header"](../table/5992.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 5994 "Service Cr.Memo Header"](../table/5994.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 6010 "Service Header Archive"](../table/6010.md) (2 calls: `GetWorkDescription → LFSeparator`, `GetWorkDescription → TryReadAsTextWithSepAndFieldErrMsg`)
- [Table 7326 "Whse. Worksheet Line"](../table/7326.md) (2 calls: `AvailableQtyToPickForCurrentLine → Minimum`, `UpdatePickQtyToHandleBase → Maximum`)
- [Table 9510 "Email Parameter"](../table/9510.md) (2 calls: `GetTextFromBLOB → LFSeparator`, `GetTextFromBLOB → ReadAsTextWithSeparator`)
- and 71 more: data/code/graph/29/calls.json

## Recent changes

- 2026-09-23 [#11507 [Master] Fix Unix timestamp timezone conversion](../../changes/bcapps/11507.md) (main, BC30, fix)
- 2026-09-09 [#11160 Ruleset hardening: promote three mechanical rules to Error](../../changes/bcapps/11160.md) (main, BC30, refactor)
- 2026-07-07 [#8951 [Master]-Time zone issue to the G/L report in Business Central](../../changes/bcapps/8951.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-26, BC29

## Deprecations

- procedure UrlEncodeSecret: Pending 27.0 (#if not CLEAN27), "Use UrlEncode with secret text."

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