Еще бага. Документооборот. Ax 3.0 SP3. (регистировали-исправляли не проверял). Прикрепляем документ к таблице входящей в виртуальную компанию, закрываем форму, открываем - пусто. Запись в DocuRef создалась с кодом текущей компании вместо виртуальной (неправильно), а при открытии формы фильтрует по виртуальной (правильно).
Лечение как я его вижу:
В классе smmDocuments
static DataAreaId getDataAreaId(RecId _refRecId, TableId _refTableId)
{
Common common;
SmmBusRelTable busRelTable;
SmmTMCallListTable tMCallListTable;
DictTable dictTable; // Ошибка при создании записи в документообороте, miv, 28.09.07
;
if (_refTableId == tableName2Id(tableStr(SmmBusRelTable)))
{
busRelTable = SmmBusRelTable::find(SmmBusRelTable::findrec(_refRecId));
common = SmmBusRelTable::findReferenceRec(busRelTable);
}
if (_refTableId == tableName2Id(tableStr(SmmTMCallListTable)))
{
tMCallListTable = SmmTMCallListTable::findRec(_refRecId);
busReltable = SmmBusRelTable::find(tMCallListTable.BusRelAccount);
common = SmmBusRelTable::findReferenceRec(busRelTable);
}
if (!common)
{
switch(_refTableId)
{
case tableName2Id(tableStr(CustTable)) :
common = CustTable::find(CustTable::findrec(_refRecId));
break;
case tableName2Id(tableStr(Vendtable)) :
common = VendTable::find(VendTable::findrec(_refRecId));
break;
case tableName2Id(tableStr(SalesTable)) :
common = SalesTable::findRecId(_refRecId);
break;
case tableName2Id(tableStr(ProjTable)) :
common = ProjTable::findRecId(_refRecId);
break;
case tableName2Id(tableStr(ContactPerson)) :
common = ContactPerson::findrec(_refRecId);
break;
case tableName2Id(tableStr(SmmActivities)) :
common = SmmActivities::findWithRecId(_refRecId);
break;
case tableName2Id(tableStr(SmmQuotationTable)) :
common = SmmQuotationTable::findrec(_refRecId);
break;
case tableName2Id(tableStr(SmmMailings)) :
common = SmmMailings::findrec(_refRecId);
break;
case tableName2Id(tableStr(SmmRelationTable)) :
common = SmmRelationTable::findrec(_refRecId);
break;
case tableName2Id(tableStr(SmmBusRelTable)) :
common = SmmBusRelTable::find(SmmBusRelTable::findrec(_refRecId));
break;
case tableName2Id(tableStr(SmmTMCallListTable)) :
common = SmmTMCallListTable::findRec(_refRecId);
break;
case tableName2Id(tableStr(SmmCampaignTable)) :
common = SmmCampaignTable::findRec(_refRecId);
break;
case tableName2Id(tableStr(SmmEncyclopediaItems)) :
common = SmmEncyclopediaItems::findRecId(_refRecId);
break;
default :
break;
}
}
// Ошибка при создании записи в документообороте, miv, 28.09.07 -->
if(!common && _refTableId && _refRecId)
{
dictTable = new DictTable(_refTableId);
common = dictTable.makeRecord();
select firstonly common
where common.RecId == _refRecId;
}
// Ошибка при создании записи в документообороте, miv, 28.09.07 <--
if (common && common.dataAreaId)
return common.dataAreaId;
return curExt();
}
|