cancel
Showing results for 
Search instead for 
Did you mean: 

DI Server Ampersand (&) Error

barend_morkel2
Active Contributor
0 Kudos

Hi All,

I'm having an issue with the Ampersand (&) character in the DI Server call using DIServer.Interact

The following works perfectly:

<DoQuery>CardName from OCRD where CardCode = 'pamgong11'</DoQuery>

The following does not work:

<DoQuery>CardName from OCRD where CardCode = 'pamgong1&1'</DoQuery>

The error returned is the following:

<env:Reason>

  <env:Text xml:lang="en">Invalid XML</env:Text>

</env:Reason>

<env:Detail>

<ErrorList>

  <Error>System Id = 156847432, Line Number = 1, Column Number = 300, Description = Expected entity name for reference</Error>

</ErrorList>

How do I handle a DI Server call that contains the  Ampersand (&) character?

Accepted Solutions (1)

Accepted Solutions (1)

pedro_magueija
Active Contributor
0 Kudos

Hi Barend,

Have you tried &amp; instead of the &? Haven't tested it though:

<DoQuery>CardName from OCRD where CardCode = 'pamgong1&amp;1'</DoQuery>


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

barend_morkel2
Active Contributor
0 Kudos

Perfect Pedro, thank you very much!

Answers (0)