In a recent project, we retrieved Dynamics 365 CRM data using WebAPI and fetchXml expressions. In most cases, we create fetchXml expressions, where we add attributes and filter conditions dynamically in the fetchXml. When we execute our dynamically created fetchXml expressions, it fails with different error messages. Here we had come across a requirement where we needed to validate the fetchXml expressions to get the proper error message before calling the retrieve WebAPI function. We had achieved this by using Dynamics 365 CRM ValidateFetchXmlExpression WebAPI function.
Please find the ValidateFetchXmlExpression WebAPI function example below, where we have passed fetchXml as input parameter with the wrong attribute name (testfield).
var fetchXml="<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">"+ '<entity name="account">'+ '<attribute name="name" />'+ '<attribute name="testfield" />'+ '<attribute...
More About This Author
Inogic is one of the leading Microsoft Dynamics 365 ISV since 10+ years. Its flagship product Maplytics™ is a market leading certified (CfMD) geo-analytical mapping app. Maplytics empowers Dynamics CRM users across industries with the power of geographical data visualization, route optimization and along the route search with turn-by-turn directions, appointment planner, locational search by radius and shapes with drill-down filters and color-coded pushpins, heat maps, shape layers & territory management.
Inogic is renowned for its high quality and low-cost offshore development services and productivity apps like InoLink: QuickBooks + Dynamics CRM, User Adoption Monitor, Attach2Dynamics, Alerts4Dynamics Click2Export, Click2Clone, Kanban Board, SharePoint Security Sync, Lead Automation & Distribution, Map My Relationships, Auto Tax Calculator, Subscription and Recurring Billing and Marketing4Dynamics.
- Dyn365CE6 December 2023WhatsApp + Dynamics 365 CRM: Your Secret to Christmas Marketing Success
- Dyn365CE5 December 2023A Guide for Monitoring and Resolving Issues with Automated Record Creation Rules in Dynamics 365 CRM
- Dyn365CE5 December 2023Jingle All the Way to Profits: Why Pre-Holiday Sales Are A Secret Weapon?
- Dyn365CE2 December 2023Season 2: Dynamics 365 CRM Apps Webinar Marathon – Boost Productivity this Holiday Season!