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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 25.11.2009, 19:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Kashperuk Ivan: Kernel functions exposed through BC.NET
Источник: http://kashperuk.blogspot.com/2009/1...ugh-bcnet.html
==============

BC.NET is a great feature of Dynamics AX. It allows to access the AX application from any external application that supports .NET, and provides a rather rich functionality out of the box.
But one feature that is missing in BC.NET is the ability to call AX kernel functions, like fieldId2Name, num2str, decRound, etc.

I needed to use these functions in my code recently, and in order to access them, I created a class in X++, that simply wraps the useful functions in static methods, kinda like the ones that exist in class Global.

Download Class_KernelFunctions.xpo

You need to import it into AX before using, of course. This can be automated, if you don't want to include this XPO as part of the package you deliver to your customers.

Now you can call it through the Business Connector the following way:

X++:
Axapta ax = new Axapta();            
ax.Logon("ext", null, "localhost", null);
// num2str(123.45, -1, 2, 1, 1);
Convert.ToDouble(ax.CallStaticClassMethod("KernelFunctions", "num2str", 123.45m, -1, 2, 1, 1));



Источник: http://kashperuk.blogspot.com/2009/1...ugh-bcnet.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Kashperuk Ivan: TableBrowser.NET (a small .NET BC tutorial) Blog bot DAX Blogs 0 18.10.2008 02:08
Kashperuk Ivan: Creating and Posting Inventory ProfitLoss journals in DAX using .NET Business Connector Blog bot DAX Blogs 0 18.01.2008 04:26
Dynamics AX: Vista, IIS 7 and .Net BC Blog bot DAX Blogs 0 14.06.2007 10:00
Dynamics AX: .Net BC Custom App, One Step Back! [Connection] Blog bot DAX Blogs 0 07.06.2007 22:41
Dynamics AX: ASP.Net and the Dynamics AX .net BC Blog bot DAX Blogs 0 05.06.2007 02:28

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

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

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