web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to handle special characters in Fetch XML while using Web API in JavaScript

(0) ShareShare
ReportReport
Posted on by 65

Hi Experts, 

How can we handle special characters like &, ', etc., while retrieving records using WebAPI in JavaScript.

I tried using encodeURI and encodeURIComponents, but everything fails with the below error.

"No other query options are supported when a SavedQuery, UserQuery, or FetchXml parameter is provided"

Please help me with the issue.

*This post is locked for comments

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Could you share the code so that we could see if we can spot any issues with Fetch or the request?

    Also have look at the following link, it might help a bit

    community.dynamics.com/.../304574

  • Community Member Profile Picture
    on at

    Its a two step process to handle special symbols in fetch xml with WEB API.

    1. Use html encoding on the filter value.

    2. Use url encoding for entire fetch xml.

  • Suggested answer
    Bipin D365 Profile Picture
    28,995 Moderator on at

    Hi,

    Can you please install Rest Builder on your CRM instance and try generating code from this tool.

    github.com/.../releases

    Please mark my answer verified if i were helpful

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
TNJ_CRM_Team Profile Picture

TNJ_CRM_Team 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans