
Hi Teams,
I'm new in Ax 2009. I would like to update the field of a record in table A after joining with another table B on which I want to apply Group by on its ID.
I tried to run the following code but it throws me an error "Cannot edit a record in tableA. The record has never been selected":
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;
}
}
If I try to remove the group by clause on tableA, tableA.Dimension[5 is empty.
Please someone help me.
Thanks in advance