An error occurred while parsing EntityName


While integrating CRM orders to our custom financial system webservice I got error “An error occurred while parsing EntityName” in my plugin. Our custom financial service accepts xml string as input, so while sending data in xml form, sometime account name contains special character like ‘&’ which is a illigal character in xml.so I wrote below function to replace illigal characters in xml request

private string FormatText(string XmlRequest)
{
string _ModifiedXML = XmlRequest.Replace(“&”, “&”);
_ModifiedXML = _ModifiedXML.Replace(“”, “>”);
_ModifiedXML = _ModifiedXML.Replace(“‘”, “'”);
_ModifiedXML = _ModifiedXML.Replace(“””, “"”);

return _XmlRequest;
}

Hope it will help somebody !!!

Advertisements

Leave a comment

Filed under MS CRM 4.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s