А не лучше ли создать новый display метод на таблице с детализацией?
X++:
display Comment comment()
{
ActionTable actionTable;
Comment comment;
if (this.Comment != '')
{
comment = this.Comment;
}
else
{
select firstonly Comment from actionTable
where this.ActionId == actionTable.ActionId;
comment = actiontable.Comment;
}
return comment;
}