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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 25.07.2013, 02:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Updating a customer address with AIF file based adapter
Источник: http://blogs.msdn.com/b/axsupport/ar...d-adapter.aspx
==============

Recently we had an issue where we needed to update a customer with an xml file using the file base adapter. Specifically, we needed to update DirPartyContactInfoView and DirPartyPostalAddressView for an existing customer.

As mentioned in http://blogs.msdn.com/b/axsupport/ar...n-ax-2012.aspx, if the entity you are calling is not a date effective entity, then this isn't too diffcult.

However, because DirPartyContactInfoView and DirPartyPostalAddressView have ValidTimeStateEnabled=Yes (as well as ValidTo and ValidFrom fields), not only did we need to use action="update", we also had to set updateMode="CreateNewTimePeriod" and also include the ValidFrom/ValidTo dates like this:



5747253274
Yes
No
No
5747258972
9668
primary phone
johndoe@msn.com

8687
5747257483
5747257483
Business
Phone
2637
2013-07-09T14:28:18Z
2154-12-31T23:59:59Z


Attached is the entire xml for the update. Once you swap out the _DocumentHash and id's (RecId, RecVersion, LocationId, etc.) for valid versions in your system, this should work against the Contoso sample data with Customer Account 10001. You'll also have to first create an Address and Contact Information entry for this customer so we'll have something to update.



Btw, the appropriate xml for most updates can be generated by using the C# code in the blog post "Calling the Update Operation on Services in AX 2012" (link above), which is easier to debug and get working when compared to handcrafted xml.

Once you have that working, perform the update then go into System Administration/Periodic/Services and Application Integration Framework.

Click on History and find the update in the message list. Click Document Logs and then View XML to see the actual XML used for the update.








Источник: http://blogs.msdn.com/b/axsupport/ar...d-adapter.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: AX 2012 for Retail - Assigning customer address books to retail stores Blog bot DAX Blogs 0 26.04.2013 00:13
emeadaxsupport: Dynamics AX 2012 Services: How to process big messages using File adapter Blog bot DAX Blogs 0 03.07.2012 00:12
emeadaxsupport: AIF XML file generator Blog bot DAX Blogs 0 20.03.2012 00:12
axinthefield: AIF File Adapter for AX 2009 - Security Authorization Blog bot DAX Blogs 0 23.06.2011 21:11
Dianne Siebold: AIF File Adapter Processing Sequence Blog bot DAX Blogs 0 26.04.2009 00:05

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:09.