Skip to main content

Notifications

Dynamics 365 general forum
Suggested answer

On Update webapi call Javascript Paging cookie is not working

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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,522 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,441 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans