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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 31.05.2019, 10:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
goshoom: Getting service operations from metadata (D365FO)
Источник: http://dev.goshoom.net/en/2019/05/ge...tadata-d365fo/
==============

When working with metadata in Dynamics 365 for Finance and Operation, the usual approach is using the MetadataSupport class. It’s a simplified interface to actual metadata classes, which is easy to use, but it doesn’t expose everything. For instance, it doesn’t return operations of custom services.

Nothing is lost, because you still can get all details from other classes of the metadata API, you just have to deal with a more implementation details such as metadata providers.

To get service operations, you can write code like this:

using Microsoft.Dynamics.AX.Metadata.MetaModel;using Microsoft.Dynamics.Ax.Xpp.AxShared; class Demo{ public static void main(Args _args) { AxService service = MetadataShared::Provider.Services.Read('DimensionService'); System.Collections.IEnumerator enumerator = service.ServiceOperations.GetEnumerator(); while (enumerator.MoveNext()) { AxServiceOperation operation = enumerator.Current; info(operation.Name); } }}






Note that if you’re interested in service operations from outside F&O, you can use web service themselves (see Discovery of JSON-based custom services in AX 7).



Источник: http://dev.goshoom.net/en/2019/05/ge...tadata-d365fo/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
msdn.microsoft.com/nav: Transition from a product to service model with connected field service Blog bot NAV: Blogs 0 24.04.2019 20:11
stoneridgesoftware: Why You Should Consider Upgrading from Dynamics AX to Dynamics 365 Finance and Operations Blog bot DAX Blogs 0 05.02.2019 18:11
erconsult: Copy-paste with keyboard script 2: from Excel to D365FO Blog bot DAX Blogs 0 03.08.2018 11:12
AIF Web Service from C# (AX 2009) AnGor DAX: Программирование 3 21.11.2016 15:24
emeadaxsupport: Error when browsing a custom service hosted as IIS web service: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) Blog bot DAX Blogs 0 12.12.2014 19:11
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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