Hi,
I'm fairly new to AX and trying to create a display method to count the number of detail lines per order.
So far my display method counts the lines, but puts the same counted value (the last counted value) next to all the orders.
Here is my current method :
display int64 counter()
{ OrderDetail orderDetail;
OrderHeader orderHeader;
int64 x;
while select count(RecId)
from OrderDetail
join OrderHeader
group by OrderHeader.OrderId
where OrderHeader.OrderId == OrderDetail.OrderId
{
x= Orderdetail.RecId;
}
return x;
}
Thank you in advance for the help.
*This post is locked for comments
I have the same question (0)