Skip to main content
Dynamics 365 Community / Forums / Finance forum / select certain fields
Suggested answer

select certain fields

editSubscribe (0) ShareShare
Posted on by 80
 Is there a way to only select few fields without the need to put select RecId for all other un-needed table fields? (I had to select RecId because i don't need other fields and to enhance performance). But is it doable to only select 3 fields without the need to repeat recId?

while select RecId from table1 where table1.Field1 == 'XX'
    join RecId from table2 where table2.FieldX == table1.Field2
        && table2.IsField4 == NoYes::Yes
    join Field5 from table5 where table5.RecId == table3.Field6
    join Field7, Field8 from table6 where table6.Field9 == table5.RecId 
    info(strFmt(/Field5: %1/,table5.Field5));
    info(strFmt(/Field7: %1/,table6.Field7));
    info(strFmt(/Field8: %1/,table6.Field8));

maybe if i put them in view it will work.. but i want to see if i can do it in x++