Показать сообщение отдельно
Старый 25.09.2018, 18:01   #11  
pedrozzz is offline
pedrozzz
Молодой, подающий надежды
Аватар для pedrozzz
MCBMSS
Лучший по профессии 2015
 
164 / 218 (8) ++++++
Регистрация: 18.02.2010
Адрес: Краснодар
Цитата:
Сообщение от gl00mie Посмотреть сообщение
Полученное значение уже можно использовать, скажем, в new DictTable(tableId).makeRecord()
есть "стандартный" метод для этого

X++:
SysDictTable::getConcreteTable(record);

X++:
/// <summary>
/// Gets the ID for the concrete table for a specified table.
/// </summary>
/// <param name="_common">
/// The buffer of the given table whose concrete table must be found.
/// </param>
/// <returns>
/// The table ID of the concrete table for the specified table.
/// </returns>
public static TableId getConcreteTable(Common _common)
{
    DictTable dt=new DictTable(_common.TableId);
    TableId concrete=_common.TableId;
    str tablename;
    //Get concrete table for inheritance
    if(dt && dt.supportInheritance())
    {
        tablename= _common.getInstanceRelationType();
        if(tablename)
        {
            concrete=tableName2id(tablename);
        }
    }
    return concrete;
}
__________________
Кононов Пётр

Последний раз редактировалось pedrozzz; 25.09.2018 в 18:12.
За это сообщение автора поблагодарили: sukhanchik (4), Logger (1), gl00mie (3).