Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed XML in the paging cookie #117

Open
priyanksster opened this issue Aug 12, 2022 · 0 comments
Open

Malformed XML in the paging cookie #117

priyanksster opened this issue Aug 12, 2022 · 0 comments

Comments

@priyanksster
Copy link

@davidyack as the current version of CRMWebAPI doesn't support large set of data, I was trying out the code from
https://github.com/mohsinonxrm/Xrm.Tools.CRMWebAPI which supports more than 5K of records. Unfortunately, I am getting the error of Malformed XML in the paging cookie at the following line of GetList :

var pageCookie = fetchXMLPagingCookie.ToString().Replace("+", " ");
pageCookie = Uri.UnescapeDataString(Uri.UnescapeDataString(pageCookie));
pageCookie = pageCookie.Substring(pageCookie.IndexOf("pagingcookie"), (pageCookie.IndexOf("/>")));
pageCookie = pageCookie.Substring(pageCookie.IndexOf("=") + 2, (pageCookie.IndexOf(@"/>") - 3));

                var fetchXML = CreateXml(QueryOptions.FetchXml, pageCookie, QueryOptions.PageNumber, QueryOptions.PageSize);
                QueryOptions.FetchXml = fetchXML;

                //Use recurrsion to get the subsequent pages
                var result = await GetList(uri, QueryOptions);

Any idea, what could be wrong? Has anyone else experienced the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant