Если перекрестные ссылки по каким-либо причинам не подходят, то примерно так. Быстрее обычного поиска.
X++:
static void findTablesWithEDT)
{
Dictionary dictionary = new Dictionary();
SysDictTable dictTable;
SysDictField dictField;
int i, j;
int typeIdToFind = typeId2ExtendedTypeId(typeid(RContractCode));
int tableCount;
str tableInfo;
;
for (i=1; i<=dictionary.tableCnt() ; i++)
{
dictTable = new SysDictTable(dictionary.tableCnt2Id(i));
if (!dictTable.isMap() && !dictTable.isView() && !dictTable.isSystemTable() && !dictTable.isTmp())
{
for (j=1; j<=dictTable.fieldCnt(); j++)
{
dictField = dictTable.fieldObject(dictTable.fieldCnt2Id(j));
if (dictField.typeId() == typeIdToFind)
{
if (!dictTable.labelLabelId())
{
tableInfo = dictTable.name();
}
else
{
tableInfo = strfmt ('%1 - %2', dictTable.name(), dictTable.Label());
}
info(tableInfo, '', new SysInfoAction_newWindow(dictTable.path()));
tableCount++;
break;
}
}
}
}
info(strfmt("Всего таблиц - %1", tableCount));
}