Filter for enum fields in OData service

It took me a while to figure out how to filter AX (Operations) enum fields in the URL for OData service (I was using Get records in Flow). For example, let’s say I wanted to get sales orders with status = open order. After a few failed attempts, I actually used classes generated by OData …

Continue reading ‘Filter for enum fields in OData service’ »

Connection string for LINQ to SQL

In my article about connecting to external databases with the help of LINQ to SQL, I already mentioned how to parametrize which database to use, because you’ll likely use different databases for development, test and live environments. I wrote: In real implementations, I usually store DB server and DB name in AX database, create a …

Continue reading ‘Connection string for LINQ to SQL’ »

Connection to external database

You sometimes need to connect from Dynamics AX to another database and read or write data there. The usual approach uses OdbcConnection class, as described on MSDN in How to: Connect to an External Database from X++ Code [AX 2012]. Although it definitely is a possible solution (I used it already in AX 3.0), it …

Continue reading ‘Connection to external database’ »

Parsing XML files with .NET Interop

Today I want to show how to download XML files from internet, validate, parse and use them in Dynamics AX 2012. It’s also yet another example of how we can simplify implementation by using appropriate .NET APIs and seamlessly integrate such a code with Dynamics AX. Our data source will be daily exchange rates provided …

Continue reading ‘Parsing XML files with .NET Interop’ »

Zpracování XML přes .NET Interop

Dnes chci ukázat, jak můžete stahovat XML soubory z internetu, validovat, parsovat a použít je v Dynamics AX 2012. Je to také další příklad toto, jak můžeme implementaci zjednodušit pomocí vhodných .NET API and pohodlně takový kód integrovat s Dynamics AX. Zdrojem našich dat budou denní směnné kurzy poskytované Evropskou centrální bankou jako jednoduchý XML …

Continue reading ‘Zpracování XML přes .NET Interop’ »