Показать сообщение отдельно
Старый 06.07.2009, 19:19   #1  
EVGL is offline
EVGL
Banned
Соотечественники
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
 
4,445 / 3001 (0) ++++++++++
Регистрация: 09.07.2002
Адрес: Parndorf, AT
Ошибка в AX2009 EE: SalesFormLetter_xxx
Коллега сообщает: в указанных классах восточноевропейцы добавили генерацию RecId вручную. К сожалению, забыли пару мест:

SalesFormLetter_PackingSlip\chooseLinesFromWMSArrival:
X++:
    void createParmTable()
    {
        if (this.allowCreateParmTable())
        {
            if (!localSalesParmTable.ParmId)
            {
                this.createParmTable(localSalesParmTable,
                                      localSalesTable,
                                      inventSiteId,
                                      localSalesTable.SalesName);

                // PAHA, Error when invoicing from shipment -->
                //RecId is needed
                localSalesParmTable.RecId  = systemSequence.reserveValues(1, tablenum(SalesParmTable));
                // PAHA, Error when invoicing from shipment <--

                recordInsertSalesParmTable.add(localSalesParmTable);
                salesParmTableMap.insert(this.salesParmTableMapKey(localSalesParmTable.SalesId, inventSiteId, '', '', ''), localSalesParmTable);

                salesParmSubTable = SalesParmSubTable::createFromSalesParmTable(localSalesParmTable,false);
                recordInsertSalesParmSubTable.add(salesParmSubTable);

                tableRefUsed = true;
                this.allowCreateParmTable(this.allowEmptyTable());
            }
        }
    }
SalesFormLetter_Invoice\chooseLinesFromWMSShipment:
X++:
    void createParmTable()
    {
        if (this.allowCreateParmTable())
        {
            localSalesParmTable.clear();
            localSalesParmTable.TableRefId  = tableRef;

            this.createParmTable(localSalesParmTable, SalesTable::find(previousSalesId));

            // PAHA, Error when invoicing from shipment -->
            //RecId is needed
            localSalesParmTable.RecId  = systemSequence.reserveValues(1, tablenum(SalesParmTable));
            // PAHA, Error when invoicing from shipment <--

            recordInsertSalesParmTable.add(localSalesParmTable);
            salesParmTableMap.insert(this.salesParmTableMapKey(localSalesParmTable.SalesId, '', '', '', ''), localSalesParmTable);
            localSalesParmSubTable = SalesParmSubTable::createFromSalesParmTable(localSalesParmTable,false);
            recordInsertSalesParmSubTable.add(localSalesParmSubTable);

            tableRefUsed = true;
            this.allowCreateParmTable(this.allowEmptyTable());
        }
    }