• Home
  • About Us
  • Contact Us
  • Privacy Policy
  • Special Offers
Business Intelligence Info
  • Business Intelligence
    • BI News and Info
    • Big Data
    • Mobile and Cloud
    • Self-Service BI
  • CRM
    • CRM News and Info
    • InfusionSoft
    • Microsoft Dynamics CRM
    • NetSuite
    • OnContact
    • Salesforce
    • Workbooks
  • Data Mining
    • Pentaho
    • Sisense
    • Tableau
    • TIBCO Spotfire
  • Data Warehousing
    • DWH News and Info
    • IBM DB2
    • Microsoft SQL Server
    • Oracle
    • Teradata
  • Predictive Analytics
    • FICO
    • KNIME
    • Mathematica
    • Matlab
    • Minitab
    • RapidMiner
    • Revolution
    • SAP
    • SAS/SPSS
  • Humor

Using FetchXML with the New Dynamics Web API

February 8, 2018   Microsoft Dynamics CRM
Using Fetch 300x225 Using FetchXML with the New Dynamics Web API

The new Dynamics Web API is a new and amazing tool built into Dynamics 365 creating a much easier way for developers to get information. With the API, you can use HTTP requests to pull data from your Dynamics environment with the power to order, filter, and select as you see fit. However, what if your call is a bit more detailed than something as simple as needing a contact’s address with this specific GUID? The API also gives you the option of pushing fetch XML into the request for cases such as these.

Let’s look at an example: I need all accounts where the primary contact is myself. Simply enough we would construct a call with “‘clientUrl’/api/data/v8.2/accounts?$ filter= _primarycontactid_value eq (contact GUID)”. Easy!

020618 2106 UsingFetchX1 Using FetchXML with the New Dynamics Web API

Now, what if it is a bit more detailed? We need all accounts where the primary contact is myself and another specific contact is another contact on a child account. So, we need to look at all the child accounts, then all the contacts on those accounts, and check to see if that contact is on that account.

Doing so with a single API call would prove to be very difficult for us, but we can push fetch XML from advanced find into the API. A call would look like so: “‘clientURL’/api/data/v8.2/accounts?fetchXML=(encoded fetch XML).

020618 2106 UsingFetchX2 Using FetchXML with the New Dynamics Web API

As you can see, with the option of using FetchXML we can get a lot more detailed if need be with linking multiple entities and using those entities with filters as well. It’s a pretty neat tool!

For the latest news and helpful tips for using Dynamics 365, check out our blog!

Happy Dynamics 365’ing!

Let’s block ads! (Why?)

PowerObjects- Bringing Focus to Dynamics CRM

Dynamics, FetchXML, using
  • Recent Posts

    • 6 Ways Machine Learning Is Revolutionizing Manufacturing in 2019
    • Friday Dance Party!
    • Manage your KPIs with Dynamics 365 Goals
    • Documents show how Google used shell companies to keep datacenter negotiations quiet
    • Incremental refresh & query folding
  • Categories

  • Archives

    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
© 2019 Business Intelligence Info
Power BI Training | G Com Solutions Limited