Does Replace a Special Character With Similar Character!

Overview: Special Character With Similar Character

In any kind of File Integration (Export/Import of a file) in dynamics 365 business central services, it is often required for the developer to check the data before whether they contain any special characters which can lead to a wrong file generation.

So, in most of the cases, it is required to replace any special character i.e., Comma (,) or Dot(.) with space or any other character.

For example, if we need to export a CSV file from BC containing master data information or journal entries, we need to be careful about Comma (,) coming into any cell value. Otherwise, the cell will move to next because of the comma.
special-character-step1
After export,
special-character-step2
So, to replace this comma we can use a function called CONVERTSTR.
String: = CONVERTSTR (String, FromCharacters, ToCharacters)

Example:

String: = CONVERTSTR(String,’,’,’-’); Here I am replacing comma with ‘-‘

special-character-step3

The new value will be:
special-character-step4

Conclusion

That is how we can replace commas or any similar special character in a field by using this string function CONVERTSTR.

Avatar photo

Sandip Sodha

Sandip Sodha is an experienced Microsoft Dynamics Business Central consultant. with the strong foundation in the concept, he knows how to make businesses run smoothly and works with organizations to create solutions that remove inefficiencies, simplify workflows, and bring real results. Sandeep is known for his clear strategy and focus on results. He ensures every Business Central rollout supports the company’s bigger goals, helping businesses grow, remain flexible, and succeed in a challenging market.

Scroll to Top