![]() |
#1 |
Участник
|
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, напишите личное сообщение администратору. |
|
|
|