Коллега сообщает: в указанных классах восточноевропейцы добавили генерацию 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());
}
}