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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.10.2013, 17:21   #1  
ist is offline
ist
Участник
 
60 / 10 (1) +
Регистрация: 29.07.2007
AX 2009 services - update operation
Hi guys,

I have a problem with AX web service when I'm using update operation.
This is my scenario:

My query is based on two tables - parent (TestServiceHeader ) an child (TestServiceLine). Only parent datasource can be updated. (datasource property Update = Yes).
In order to use update service operation, I have to use read operation first. When I execute read operation AX returns instances for each tables (Ax...class objects) which are parts of the query. When I try to update TestServiceHeader table AX throws an exception. For this reason the instance of TestServiceLine has beeen set to null - red bordered row.
Is there any way to do that (without set to null child datasource)?

As you can see on the screenshot I want to update only header table.

Нажмите на изображение для увеличения
Название: test_service_1.png
Просмотров: 409
Размер:	29.1 Кб
ID:	8490

Thanks,
ist
Старый 23.10.2013, 05:51   #2  
Alex_KD is offline
Alex_KD
Участник
AxAssist
MCBMSS
Соотечественники
 
522 / 362 (14) ++++++
Регистрация: 06.07.2006
Адрес: Melbourne, Down Under
Hi ist,

I believe TestServiceLine also has a property 'action'.

Цитата:
When I try to update TestServiceHeader table AX throws an exception
You can find a place in code where the exception been thrown and get more ideas about what is wrong. I would also suggest to modify exception so it'll provide more information about variables etc. From my experience dealing with Aif I can say that AIf exception messages usually doesn't contain enough information.

Rgds,
Alex
__________________
AxAssist 2012 - Productivity Tool for Dynamics AX 2012/2009/4.0/3.0
Старый 23.10.2013, 11:58   #3  
ist is offline
ist
Участник
 
60 / 10 (1) +
Регистрация: 29.07.2007
Hi Alex,

The problem is the xml message I mean. I have made screenshots.

1. The child table class instance is set to null

Нажмите на изображение для увеличения
Название: update_correct.png
Просмотров: 294
Размер:	24.7 Кб
ID:	8495

2. The child table class instance is not set to null.

Нажмите на изображение для увеличения
Название: update_wrong.png
Просмотров: 291
Размер:	43.3 Кб
ID:	8498

The second case have TestServiceLine section <TestServiceLine class="entity"> without action.
The exception is:

Нажмите на изображение для увеличения
Название: aif_exception.png
Просмотров: 329
Размер:	19.8 Кб
ID:	8499

I found a bunch of examples regarding AIF update operation which updates the parent table only, and without set child instances to null. I can't run this examples without mentioned exception.

Regards,
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
amer-ax: It was a great day! Blog bot DAX Blogs 3 29.12.2012 01:02
dynamics-community.at: Dynamics AX 2009 Rollup Update 6 released Blog bot DAX auf Deutsch 0 17.11.2010 18:11
emeadaxsupport: What changes are required if we change the Business Connector Proxy used by AX 2009 Generated AIF Web services Blog bot DAX Blogs 0 29.03.2010 15:05
emeadaxsupport: List of fixes that improve performance of certain features in Dynamics AX 2009 Blog bot DAX Blogs 0 13.10.2009 19:06
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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