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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 13.09.2011, 18:29   #1  
Dark Smile is offline
Dark Smile
Junior AX Developer
 
16 / 10 (1) +
Регистрация: 17.06.2011
Stopping a production route with x++
Hello,

for a customer i have to start and stop production route's automatically from x++.
I have all needed data from the beginning and for starting i use the class "ProdMultiStartUp" which works fine for me.

For stopping i looked at the standard form (ProdParmReportFinished) and found the class "ProdMultiReportFinished".
I tried to do it like with the starting and created a duplicate of this class and modified it.

Now my problem is, it looses the QtyError and QtyGood values during the run. This causes a error and cancel the proccess to stop the route.
The Error Message is:
"Quantity reported as finished exceeds the quantity started.
Total good quantity reported as finished for the production will be 15.00.
Feedback for the last operation is 0 in total.
Update has been canceled.
"

I am setting these values at the call of the class and they are present. While debugging i recognized in "\Classes\JournalCheckPost\runInit" there is a call to "journalTableData = JournalTableData::newTable(JournalStatic::findJournalTableId(journalTableId,journalId,true));"
and then there aren't QryError and QtyGood values anymore in "journalTableData.journalTable".

My Callstack:
Цитата:
[s] \Classes\JournalCheckPost\runInit 4
[s] \Classes\ProdJournalCheckPost\runInit 6
[s] \Classes\ProdJournalCheckPostRoute\runInit 7
[s] \Classes\JournalCheckPost\run 14
[s] \Classes\ProdJournalCheckPostRoute\run 4
[s] \Classes\ProdUpdReportFinished\updateRouteConsumption 17
[s] \Classes\ProdUpdReportFinished\run 46
[s] \Classes\YAV_ProdBatchStopClass\stopOpr 63
[s] \Classes\YAV_ProdBatchStopClass\run 33
[c] \Jobs\Job2 23
Can you help me to find my mistake with this code or do you maybe know a better and simplier way to stop a prod route?

Thanks in advance!
Миниатюры
Нажмите на изображение для увеличения
Название: screen4forum.jpg
Просмотров: 364
Размер:	212.3 Кб
ID:	7149  
__________________
Kind Regards
Robin

Последний раз редактировалось Dark Smile; 13.09.2011 в 18:32.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
dynamicscare: Why use a Report as Finished Journal to report a production? Blog bot DAX Blogs 0 05.08.2011 20:13
dynamicsaxtraining: Production life cycle Blog bot DAX Blogs 0 16.07.2011 01:23
dynamics-ax-dev: Copying a Production Environment into a Development/Test Environment Blog bot DAX Blogs 0 02.12.2010 00:11
dynamicsaxtraining: Production – Overview Blog bot DAX Blogs 0 26.06.2010 01:09
dynamicsaxtraining: Production training (TOC) Blog bot DAX Blogs 0 26.06.2010 01:09

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

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

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