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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.10.2006, 19:01   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Dave: Followup to AIF Configuration Entry
Источник: http://daxdave.blogspot.com/2006/10/...ion-entry.html
==============
I noticed an additional comment onto my AIF Configuration entry today and decided I would answer and inject some new findings that I have since last discussed. The comment asked how to add an additional field to an existing XML transaction such as the Purchase Order transaction which works off of the AxdPurchaseRequisition document.

First of all the documentation up on MSDN is getting a lot better. The documentation team has added many different articles on explanations of AIF, detailed explanations of the different transactions, and how the AxTable classes work compared to the Axd classes. Check out Dynamics MSDN at http://msdn.microsoft.com/mbs/

Generally, to add a field to any AIF transaction you must first determine the underlying tables to that transaction and add the appropriate fields. In the case of Purchase Orders, the main underlying table to it is the PurchTable/PurchLines or for Sales Orders is SalesTable/SalesLines. This is where you need to add the fields that you would like to appear in the AIF Transaction. Also, if you want these fields to be editable by your users, of course you need to add these to the front end GUIs to these tables. After you have made these additions, run the Axd Class Wizard to make these additional fields appear in the respective action's schema.

Axd Class Wizard Walkthrough
1.) Choose what Query is being used for the Axd Document Creation and click 'Next'.
(If the AIF transaction is one that came with the base AX installation, the query will be named Axd..., i.e. AxdPurchaseRequisition. You should also strive to name all of your custom AIF action queries with the 'Axd' prefix for standardization.)

2.) Leave the Class Name as-is and enter a label for the for the Axd class. Choose what actions can be performed for this AIF document transaction and click 'Next'. For a list of the actions' meanings, see http://msdn.microsoft.com/library/de...91f46cc2ed.asp. You will notice that the 'Supported Actions' names on the Wizard correspond to the Axd Document Method column.

3.) On this final screen, if this is an existing Axd Document, you should see the 'Generate AxBC Classes' checkbox is grayed out. Check the 'Regenerate existing AxBC Classes' checkbox and click 'Generate'. If the Axd Document is new, check 'Generate AxBC Classes' and click 'Generate'.

4.) Open the Actions form in Basic -> Setup -> AIF -> Action. If the Axd Document you were working on already existed, you can simply highlight the action and click the 'Re-register' button. If the Axd Document was new, click the 'Scan and Register' button to reread all Axd Document classes, which will find your newly created class.

5.) Either way, after the scan and/or register process finishes, you should be able to highlight the appropriate action, click 'View Schema' and see the new field that has been added to the XML schema associated with the action.

Finally, just a quick overview of what the AxTable classes are compared to the Axd classes:

Axd classes extend the AxdBase class which contains the logic for developing the XML Schema and implementing the six Actions referenced above Create, CreateList, Send, SendList, findList, and findEntityKeyList. There is also logic for validating the XML documents for compliance to the XML Schema associated with the Action.

AxTable classes extend the AxInternalBase class and contain the logic for validating and writing data retrieved from the XML documents to their respective tables in AX. This class contains data validation logic. This logic is contain in each parmFieldName method within the respective AxTable class.

Currently, I am working to write my own custom AIF validation logic, particularly in the createListSalesOrder action and particularly with the AxSalesLine.parmItemId() method. Out of the box, AX kicks out any inbound XML SalesOrder that has a SalesLine that contains an ItemId that is not present within the InventTable. I am working to write additional validations to check for the existence of ItemId in the InventTable and if it does not exist, assigning a 'catch-all' ItemId to ItemId such as 'InvalidItem', and writing the original invalid item to the Name field. Ultimately the order will be halted and an alert will be sent to an Order Analyst who will try to determine what is invalid with the Item Id, but the order will still post in the SalesTable/SalesLine tables and won't be kicked out as with the current functionality. My current modifications have yielded failure on the processing part of the AIF but I'm confident I will have success within the next week. Once I determine how to add my validations without breaking the AIFInboundProcessing process, I will post my findings.

I see AIF as have the potential of being extremely powerful and extendable to incorporate custom business logic, but the documentation so far is nonexistent of how to do so in a standardized way in which you won't systematically blow up the existing processes (like I have in my tinkering).

I hope this helps. If you have any questions, I'll try to answer them as best as I can in subsequent entries.


==============
Источник: http://daxdave.blogspot.com/2006/10/...ion-entry.html
Теги
ax2009, axbc

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Dave: AIF Configuration and Additional Findings Blog bot DAX Blogs 1 04.11.2009 17:29
AX UK: AIF BizTalk Adapter Configuration White Paper Blog bot DAX Blogs 0 27.01.2009 10:05
Inside Dynamics AX 4.0: Licensing and Configuration Blog bot DAX Blogs 0 31.10.2007 11:40
Dave: Custom Validation Modifications to AIF Blog bot DAX Blogs 0 02.11.2006 22:21
при построении перекрёстных ссылок выдаётся сообщение об ошибках mmmax DAX: Программирование 10 21.01.2005 12:42

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

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

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