---
id: post/yzhums-com/75649
type: post
title: "Dynamics 365 Business Central: How to quickly remove Non-Alphanumeric Characters in AL"
summary: The post shows how to strip non-alphanumeric characters from text in Business Central AL using the standard codeunit 47 StringConversionManagement and its RemoveNonAlphaNumericCharacters procedure. A page extension example on the Customer Card cleans the Name field in its OnBeforeValidate trigger, so only letters and digits are kept.
tier: community
language: en
tags:
  - al development
  - string manipulation
  - data validation
  - character filtering
  - code examples
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:39:12.655Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: a3ba21f7f683b9d32845e7f8bd54eba7b7ee9bef1c7526a33fca3a1beaf12158
evidence:
  - kind: blog
    url: https://yzhums.com/75649/
    title: "Dynamics 365 Business Central: How to quickly remove Non-Alphanumeric Characters in AL"
    date: "2026-09-02"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://yzhums.com/75649/
    title: "Dynamics 365 Business Central: How to quickly remove Non-Alphanumeric Characters in AL"
    date: "2026-09-02"
    commit: null
    t: null
    quote: we can use the standard codeunit 47 StringConversionManagement
links:
  learn: []
  objects:
    - object/codeunit/47
    - object/page/21
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: post/aardvarklabs-blog/2741
      title: "Understanding AL Development: String Conversion Management Code Unit"
      label: possibly related
      why: both name Codeunit 47 "StringConversionManagement"
      by: code
post_id: "75649"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/75649/
published_at: "2026-09-02T00:55:30.000Z"
author: Yun Zhu
full_text: false
words: 223
quotes:
  - text: we can use the standard codeunit 47 StringConversionManagement
    why_it_matters: Identifies the specific built-in tool developers should use instead of creating custom solutions
code_objects_mentioned:
  - codeunit StringConversionManagement
  - page Customer Card
systems:
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2026/09/Snipaste_2026-09-01_16-12-28.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:00:48.012Z"
---

# Dynamics 365 Business Central: How to quickly remove Non-Alphanumeric Characters in AL

[Read the post](https://yzhums.com/75649/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2026-09-02 · 223 words · tier community · reviewed (checked by Opus)

> The post shows how to strip non-alphanumeric characters from text in Business Central AL using the standard codeunit 47 StringConversionManagement and its RemoveNonAlphaNumericCharacters procedure. A page extension example on the Customer Card cleans the Name field in its OnBeforeValidate trigger, so only letters and digits are kept.

## Key points

- Use codeunit 47 StringConversionManagement and its RemoveNonAlphaNumericCharacters method to filter strings
- The method leaves only letters A-Z and numbers 0-9, removing special characters, symbols, spaces, and emoji
- Can be applied in page extensions using OnBeforeValidate triggers to clean data during user input
- Offers a cleaner built-in solution compared to custom methods for handling non-alphanumeric character removal

## Quotes

- "we can use the standard codeunit 47 StringConversionManagement" (Identifies the specific built-in tool developers should use instead of creating custom solutions)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [codeunit 47 "StringConversionManagement"](../../objects/codeunit/47.md)
- [page 21 "Customer Card"](../../objects/page/21.md)

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Understanding AL Development: String Conversion Management Code Unit](../../posts/aardvarklabs-blog/2741.md) — possibly related: both name Codeunit 47 "StringConversionManagement"

## Context

- Features: RemoveNonAlphaNumericCharacters method, input validation, string conversion

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
