AcuLocalizationMd5Hash Operator - Haufe-Lexware/haufe.no-frills-transformation GitHub Wiki

Creates an MD5 hash string from input text according to Acumatica's localization hashing rules.

Description

The aculocalizationmd5hash operator generates an MD5 hash using Acumatica's specific localization algorithm. It converts the input to lowercase and uses Unicode encoding, which is the standard method Acumatica uses for generating localization value IDs.

Parameters

Parameter Type Description
input String The text string to hash (will be converted to lowercase)

Return Value

Returns a 32-character uppercase hexadecimal string representing the MD5 hash of the lowercased input using Unicode encoding.

Example

Configuration

<Field name="Id">aculocalizationmd5hash($NeutralValue)</Field>
<Field name="LocalizationKey">aculocalizationmd5hash(concat($Screen, ".", $Field))</Field>

Input Data

NeutralValue Screen Field
Customer Name AR303000 CustomerName
Invoice Number AR301000 InvoiceNbr
CUSTOMER NAME SO303000 CustomerName

Output

Id LocalizationKey
E4F2A9C8B6D1E3A5C7F9B0D2E4A6C8F0 1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P
9B7D5F3A1C9E7B5D3F1A9C7E5B3D1F9A 2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q
E4F2A9C8B6D1E3A5C7F9B0D2E4A6C8F0 3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R

Note: Records 1 and 3 produce the same Id hash because the input is converted to lowercase before hashing ("Customer Name" and "CUSTOMER NAME" both become "customer name").

Differences from acumd5hash

Feature acumd5hash aculocalizationmd5hash
Case sensitivity Case-sensitive Case-insensitive (converts to lowercase)
Encoding ASCII Unicode
Use case General hashing Acumatica localization IDs

Use Cases

  • Localization IDs: Generate IDs for Acumatica LocalizationValue table
  • Translation keys: Create deterministic keys for translation strings
  • Screen labels: Generate IDs for UI labels and field names
  • Duplicate detection: Identify duplicate localization entries (case-insensitive)

Behavior

  1. Input string is converted to lowercase
  2. Unicode encoding is used for hashing
  3. MD5 hash is computed
  4. Result is returned as uppercase hexadecimal string
  5. Same input (regardless of original case) always produces the same hash

Example: Acumatica Localization Import

<Target uri="acumatica://LocalizationValue.xml" config="localization_config.xml">
    <Field name="Id">aculocalizationmd5hash($NeutralValue)</Field>
    <Field name="NeutralValue">$NeutralValue</Field>
    <Field name="IsNotLocalized">acubool("false")</Field>
    <Field name="CreatedDateTime">acudatetimenow()</Field>
</Target>

This generates proper Acumatica localization IDs that match Acumatica's internal ID generation algorithm.

Security Note

⚠️ MD5 is not cryptographically secure and should not be used for security purposes. This operator is designed specifically for Acumatica's localization system requirements.

Notes

  • The input is always converted to lowercase before hashing
  • Uses Unicode (UTF-16) encoding, unlike acumd5hash which uses ASCII
  • This matches Acumatica's internal localization ID generation algorithm
  • Empty string input produces a valid MD5 hash
  • The hash is always 32 characters long

See Also

⚠️ **GitHub.com Fallback** ⚠️