We all make mistakes. Perhaps the developer who wrote the RDP class made a mistake or the data processing requirements of the report have changed.
Code Review: Query
If a query takes a long time to run, see if you can make it run more efficiently.
Common areas of improvement are:
- Inner joins vs. exist joins
- Dynamic field property set to Yes
If the business requirement is to see if a record exists, we can accomplish this through an inner join. However, when we do this we may be pulling unnecessary amounts of data into AX.
For example, the business requirement in the query below is to give all purchase order lines where the vendor’s vendor group has a payment term of 30 days. The join to the VendGrouptable is only to filter the results, no VendGroup fields are required in the report.
*This post is locked for comments