我是 Ax 2009 的新手。在加入另一个表 B 后,我想更新表 A 中记录的字段,我想在其 ID 上应用 Group by。
我尝试运行以下代码,但它给我一个错误“无法编辑 tableA 中的记录。该记录从未被选中”:
where select forupdate tableA group by tabAid, Dimension[5]
join tableB group by tabBid, Dimension[5]
where tableA.tabAid == tableB.tabBid && tableB.Dimension[5] != "" && tableA.Dimension[5]
{
if(tableA.Dimension[5] != lines.Dimension[5])
{
ttsbegin;
tableA.Dimension[5] = tableB.Dimension[5];
tableA.update()
ttscommit;
}
}
我认为这应该是由于在 tableA 上使用 Group By 子句引起的,但是如果我将其删除,则在 if 检查中, tableA.Dimension[5] 为空。
请有人帮助我。谢谢你。