How to escape Special Characters?


We are using manual numbers on Customer table. There are few Customers in our database whose No. has an ampersand (&) in it. For example, the customers are coded as G&M01, MED25, and so on.

Both of these customers have transaction lines in it. Now, if I run the Report No. 116 to get a customer statement, for the customer G&M01, I’m getting a blank screen while MED25 displays the transaction lines. [:(]

Is there a way to get around the problem with the ampersand character in C/AL?



Do you need the ampersand sign?

If not, try to rename your customer no. Do at times where no other users are in the system, because it takes some times and blocks some tables [:)]

If yes, I have no quick tip [:(]

I really don’t want to add the ampersand character to customer numbers. But few of our customer accounts holds the numbers with an ampersand in it. Actually, these accounts were imported from Exchequer system to Navision.

Can anyone help with this query?

I am not sure if it helps.

I guess the system treats the character & as a condition “and” for search, have you tried to quote the customer no., i.e. ‘G&M01’ when you run the report?

This works. [:-)]