AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
CRM
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 07.02.2018, 23:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
powerobjects: Using FetchXML with the New Dynamics Web API
Источник: https://www.powerobjects.com/2018/02...amics-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!



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).



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!



Источник: https://www.powerobjects.com/2018/02...amics-web-api/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
powerobjects: Configuring the Dynamics 365 App for Outlook Blog bot Dynamics CRM: Blogs 0 08.11.2017 01:12
german_nav_developer: Buildnummern-Übersicht Microsoft Dynamics NAV 2013 Blog bot NAV: Blogs 0 15.05.2016 18:12
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 15 Blog bot Dynamics CRM: Blogs 1 10.02.2016 10:26
Microsoft Dynamics CRM Team Blog: The Microsoft Dynamics CRM Swiss Army Knife Blog bot Dynamics CRM: Blogs 1 19.04.2012 08:20
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 15:32.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.