22

Developers have the option to specify a join with FirstOnly keyword. The code will then insinuate data will be retrieved form the left table, joined with max one record from the right table.


 


Example:


select SalesTable where SalesTable.SalesId == '123'
join firstonly SalesLine where SalesLine.SalesId == SalesTable.SalesId;


Actual result:


The firstonly keyword will be ignored, without a compile warning.


Expected result:


I would expect (option 1) a compile warning, notifying the developer for the fact that this keyword will be ignored. Or (option 2) AX can start supporting this option by generating a SQL statement containing a CROSS APPLY to the second statement.

Category: Development
STATUS DETAILS
Under Review