Skip to content

Problem with ampersand in FetchXML in GetList() #101

@msymer

Description

@msymer

When you want to search for example for client by name "H&M" and you write this condition in FetchXML
<condition attribute="name" operator="eq" value="H&M" /> , it does not work. I tried all the combinations with & %26 ... but none is working.

Solution can be this in CrmWebAPI.cs (line 1067):

if (firstParam)
        {
          fullurl = fullurl + string.Format("?fetchXml={0}", Uri.EscapeUriString(queryOptions.FetchXml).Replace("&", "%26amp%3B"));
        }
        else
        {
          fullurl = fullurl + string.Format("&fetchXml={0}", Uri.EscapeUriString(queryOptions.FetchXml).Replace("&", "%26amp%3B"));
        }
        firstParam = false;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions