Источник:
http://alexvoy.blogspot.com/2018/10/...-ids-from.html
==============
<div dir="ltr" style="text-align: left;" trbidi="on">We can loop all relations on a table by code.
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
static void wzhGetRelatedTableNames(Args _args)
{
wblInExtCodeValueTable wblInExtCodeValueTable;
int mapId;
TableName relatedTableName;
TableId relatedTableId;
Set tablesIdsSet =
new Set(Types::Integer);
Set tablesNamesSet =
new Set(Types::String);
TableId tableId = tableName2id(tableStr(wblInExtCodeValueTable));
Dictionary dictionary =
new Dictionary();
SysDictTable dictTable = dictionary.tableObject(tableId);
DictRelation dictRelation =
new DictRelation(wblInExtCodeValueTable.TableId);
int mapCnt = dictTable.relationCnt();
container ret ;
str relationName;
//create a maps of literals for all tables from the table relations
// so that we could get tables names based on their ids
// and if any new relation will be added to multiple external codes table
// it is present automatically in this view
for (mapId=
1; mapId