Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

On Update webapi call Javascript Paging cookie is not working

(0) ShareShare
ReportReport
Posted on by 315

Dear All,

I am getting cookies from the WebAPI when it is GET method from JavaScript and I am trying to pass that value in fetch xml and trying to update the value  using PATCH request in WebAPI call.

Suppose we are having 12 records, first call we are retrieving 10 records and we have to use the cookie by passing in fetch query to get the Next values(2 records) using same GET method WebAPI call recursively.

But I am facing issue while passing the cookie. I am getting error-"error":{"code":"0x80040201","message":"Malformed XML in the Paging Cookie"}}.

We have replaced the special characters, still we are unable to get the response for the same.

Raw Value : 

<cookie pagenumber="2" pagingcookie="%253ccookie%2520page%253d%25221%2522%253e%253ccontactid%2520last%253d%2522%257b71A5E5B9-88DF-E311-Q8D5-6F3BE5V8c200%257d%2522%2520first%253d%2522%257b57A0E5B9-88DF-E311-B8E5-6C3BE5A8B200%257d%2522%2520%252f%253e%253c%252fcookie%253e" istracking="False" />

Decoded Value:

<cookie pagenumber="2" pagingcookie="<cookie page="1"><contactid last="{71A5D8B9-88DF-E311-B8E5-6C3BE5A8B200}"
first="{57A0E5B9-88DF-E711-B8E5-6C3BE5B8B200}" /></cookie>" istracking="False" />"

Please let me know any suggestions.

Thanks in Advance!

Regards,

Krishna.

  • Suggested answer
    RE: On Update webapi call Javascript Paging cookie is not working

    Hi Krishna,

    It appears your issue is similar to https://community.dynamics.com/365/sales/f/dynamics-365-for-sales-forum/288369/pagination-fetchxml-paging-cookie-keeps-failing-with-invalid-xml/826368.

    Can you check to see if it helps?

    Let me know what the results are.

    Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans