D365 Business Central : Delete Special Characters in Text

If you want to remove any specific characters in a text, such as removing -*!? characters, you can use below code.

NewText := DelChr(OldText, '=', '-*!?');

If you want to do it the other way around, such as keeping only A-E characters and remove the rest, you can use below code.

NewText := DELCHR(OldText,'=',DELCHR(OldText,'=','ABCDEabcde'));

thatnavguy

Experienced NZ-based NAV Developer and Consultant with 15+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central. Passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs.

You may also like...

1 Response

  1. 25 November 2021

    […] Delete Special Characters in Text […]

Leave a Reply

Your email address will not be published. Required fields are marked *