Благодаря Ивану, в табаксе есть код, выводящий истоячник для текущего поля. Вот он:
X++:
Object formControlEditField;
TreeNode runTreeNode;
TreeNode getDataSourceNode()
{
int dataSourceId;
int fieldExtId;
str dataMethodName;
TreeNode fieldNode;
;
dataSourceId = formControlEditField.dataSource();
fieldExtId = formControlEditField.dataField();
dataMethodName = formControlEditField.dataMethod();
if (dataSourceId)
{
if (fieldExtId)
{
fieldNode = TreeNode::findNode(#TablesPath + #AOTRootPath + tableId2Name(currentForm.form().dataSource(dataSourceId).table()) + "\\Fields");
if (fieldNode)
fieldNode = fieldNode.AOTfindChild(fieldId2Name(currentForm.form().dataSource(dataSourceId).table(), fieldExt2Id(fieldExtId)));
if (fieldNode)
fieldNode.AOTnewWindow();
return fieldNode;
}
else
{
if (dataMethodName)
{
fieldNode = TreeNode::findNode(strFmt(#DataSourceMethodPath, #FormsPath + #AOTRootPath + currentForm.name(), currentForm.form().dataSource(dataSourceId).name(), dataMethodName));
if (fieldNode)
fieldNode.AOTedit();
else
{
fieldNode = TreeNode::findNode(strFmt(#MethodPath, #TablesPath + #AOTRootPath + tableId2Name(currentForm.form().dataSource(dataSourceId).table()), dataMethodName));
if (fieldNode)
fieldNode.AOTedit();
}
}
}
}
return null;
}