Electronic reporting: Method returning a list of records

I had a scenario in electronic report where I wanted to reuse existing X++ code that generates some temporary table records for reporting purpose. Therefore I wanted electronic reporting to call my X++ method (for a particular context, an invoice in this case) and use the list of records returned by this method. Electronic reporting …

Continue reading ‘Electronic reporting: Method returning a list of records’ »

Query/QueryRun with temporary tables (AX/F&O)

I noticed that some developers believe that Query* classes can’t be used to query temporary tables. It is possible; it just requires an extra step that isn’t needed with regular tables. When working with temporary tables, each buffer (variable) of the same table can refer to a different set of temporary data. Therefore using the …

Continue reading ‘Query/QueryRun with temporary tables (AX/F&O)’ »

AX, temporary table, Unit Test and DuplicateKeyException

Why do I link AX, temporary table, unit test and DuplicateKeyException? Because if I put them together, it behaves quite strangely. I have a temporary table, I insert some data into it and in an exceptional case, when a duplicity occurs, I catch the DuplicateKeyException and simply ignore such insert. And it works correctly. The …

Continue reading ‘AX, temporary table, Unit Test and DuplicateKeyException’ »