Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: How to create the following while select into an x++ query

$
0
0

Let me make your code a bit more readable. Next time, please use the </> button in the rich formatting view and try to arrange your code to be as clear as possible.

while select firstonly100 rent
    order by PostedDate desc
    where (rent.PostedDate > td && rent.RentalOrderStatus == z_RentalOrderStatus::Posted)
       || rent.RentalOrderStatus == z_RentalOrderStatus::Approved
{
    info("orders");
}
QueryBuildRange range = this.query().dataSourceTable(tableNum(z_RentalOrderTable)).addRange(fieldNum(z_RentalOrderTable, RentalOrderStatus));

range.value(strfmt('(((%1 = %2) && (%3 > %4)) || (%1 = %5))',
    fieldStr(z_RentalOrderTable, RentalOrderStatus),
    any2int(z_RentalOrderStatus::Posted),
    fieldStr(z_RentalOrderTable, PostedDate),
    dateRange,
    any2int(z_RentalOrderStatus::Approved)));

What's the value of dateRange?


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>