Hello,
I have a temp table that has a record for now (it may have more in different scenarios). I am doing a while loop on it to fill another temp table and here is the code looks like
while select tmpProjAdjustmentSale where tmpProjAdjustmentSale.TransId == tmpProjAdjustment.TransId { tmpProjAdjustmentCreateSale.clear(); tmpProjAdjustmentCreateSale.RefRecId = tmpProjAdjustmentCreate.RecId; tmpProjAdjustmentCreateSale.SaleRefRecId = tmpProjAdjustmentSale.SaleRefRecId; tmpProjAdjustmentCreateSale.FundingSource = tmpProjAdjustmentSale.FundingSource; tmpProjAdjustmentCreateSale.SalesPrice = tmpProjAdjustmentSale.SalesPrice; tmpProjAdjustmentCreateSale.LineAmount = -tmpProjAdjustmentSale.LineAmount; if (tmpProjAdjustment.AdjustmentType == ProjAdjustmentType::Revenue) { tmpProjAdjustmentCreateSale.SalesPrice = -tmpProjAdjustmentSale.SalesPrice; tmpProjAdjustmentCreateSale.LineAmount = -tmpProjAdjustmentSale.LineAmount; } tmpProjAdjustmentCreateSale.DefaultDimension = tmpProjAdjustmentSale.DefaultDimension; tmpProjAdjustmentCreateSale.insert(); //select * from tmpProjAdjustmentSale; }
I am not sure if I am missing something here but when it finishes the loop then when I mouse hover or add the temp table to the watch window there is no record the record in the tmpProjAdjustmentSale disappears. tmpProjAdjustmentSale is a class level variable. Anything wrong in the code?
AX version: AX 2012 feature pack
Thanks!