Event handler for multiple events

I’m not sure that everybody is aware that a single event handler method (in Dynamics 365 for Finance and Operations) can be decorated with several event handler attributes. For example, a common method can handle both inserts and updates. [ DataEventHandler(tableStr(MyTable), DataEventType::Inserted), DataEventHandler(tableStr(MyTable), DataEventType::Updated) ] public static void myHandler(Common _sender, DataEventArgs _e) Or it can …

Continue reading ‘Event handler for multiple events’ »

OData service across companies

The OData service in Dynamics 365 for Operations returns data from user’s default company. But you can easily add cross-company=true to the URL (e.g. https://myaos.cloudax.dynamics.com/data/Customers?cross-company=true) to get data from all companies. You can also filter the query by DataAreaId field, if you want data from a specific company. But developers usually don’t construct the URL …

Continue reading ‘OData service across companies’ »

Tutorial: WPF User Control for AX2012

One of many new features in Dynamics AX 2012 which bring fantastic new possibilities is the ability to host managed UI controls, both from Windows Forms and WPF. Microsoft made a great effort to integrate the .NET environment and AX, not only from a run-time perspective but also for developers, easy event handling and so …

Continue reading ‘Tutorial: WPF User Control for AX2012’ »

AX2012: Events (II)

In the previous part I showed how to place a call of some action before or after a particular method. Today’s article describes another approach to events, much closer to events in C#, for instance. Event-driven development is basically about having one part of an application raising an event (e.g. “button clicked” or “record modified”) …

Continue reading ‘AX2012: Events (II)’ »

AX2012: Events (I)

One of new concepts in Dynamics AX 2012 are events and event handling. It was announced in advance that it will be possible to “hang” an event handler before and after every method, so let’s take a look at what it means in practice. You can choose New Event Handler Subscription in the context menu …

Continue reading ‘AX2012: Events (I)’ »