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!