Custom properties in monitoring and telemetry

Two years ago, I wrote a blog post Monitoring and telemetry in F&O where, among other things, I showed how to add a custom trace message and even include a custom property: Map properties = new Map(Types::String, Types::String); properties.add(’Feature’, ‘My feature 1’); properties.add(’MyCorrelationId’, ‘123456’);   SysGlobalTelemetry::logTraceWithCustomProperties(’Custom message from X++’, properties) Microsoft keep evolving this area …

Continue reading ‘Custom properties in monitoring and telemetry’ »

Default fields in Open in Excel

When you open a data entity in Data Connector in Excel (usually from an F&O form by Open in Excel), not all fields must be displayed by default. You can go to Designer and add more fields from Available to Selected. But what if you want some fields included by default? You could create a …

Continue reading ‘Default fields in Open in Excel’ »

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’ »

Getting attributes in X++

In X++, you can decorate classes and methods with attributes. Attributes were added in AX 2012 (I believe), where the typical use case was a definition of data contracts. They’re much more common in F&O, because they’re also used for CoC and event handlers. For most developers, attributes are something defined by Microsoft and used …

Continue reading ‘Getting attributes in X++’ »

Run settings for SysTest

When you execute automated tests of X++ code with SysTest, the test service (SysTestService class) gets called with some parameters, defined in SysTestRunnerSettings: You could, for example, set granularity to execute just unit tests and skip integration tests, or produce a trace file for diagnostics. You may want to use such parameters in automatic processes …

Continue reading ‘Run settings for SysTest’ »