How to add subquery result in X++ FO D365
If you want to add a subquery result in the lookup x++, Kindly follow the following steps; 1 - You have to create a temp table; TableTmp tableTmp; 2- Add all records of TableA in the temp table as show below; tableTmp.clear(); while select TableA { tableTmp.RequestId = TableA .RequestId; tableTmp.doinsert(); } 3- Remove the record you don't need in the tempTable, Which exists in TableB as shown below; while select TableB { select firstonly tableTmp where tableTmp.RequestId == TableB.RequestId; ...