Skip to main content

Posts

Tax calculation on Net amount - Gotcha

In AX you have various ways of calculating tax . The one that is most confusing is calculating on the Net amount.  I thought I would show a few examples where you can get caught on this. Notice below an example with negative lines. See how the distribution looks wrong but it is right. It distributes the rounded tax amount based on the total of the invoice. Another simpler example where the total of the invoice is zero. There is no tax calculated. There a few things you should consider when choosing this method. Do not add the Tax amount column on the Invoice report. This can make people say it is calculating incorrectly and you having to explain this problem. Standard AX does not have the tax amount column for this reason. If you are integrating with another system, make sure your method of calculating tax is the same. For example, if you are integrating an ecommerce web site with orders. Download the excel file for a working example . Follow the instructions and enter you...

Tip of the day: Set up one environment at a time on LCS

When setting up new environments on LCS, always try to set up one at a time. This is so that you have a bit more control over your environments. Here below I have set up a Developer and a Build VM in one shot. You will notice the controls to start and stop the images are for both VMs.

Hide dimension attribute using XDS [AX 2012]

This was something I had a look at recently. I had to hide certain dimension for specific security roles. I won’t go into the details of why as that is another longer conversation. This can be achieved using XDS (security policy). One thing you have to keep in mind is if a dimension is defaulted it will contain a value. I set up a vendor with a default dimension as per screenshot. On the form it showed the 3 dimensions but in the database it was actually defaulting as above full 5 dimensions. This is because it is defaulting the RecId reference to the dimension value combination.

AX 2012 R3 Entity Store

Recently there was a release of the entity store for AX 2012 R3. This is a great tool that makes data warehousing simple and close to real time. Traditionally with a data warehouse, you would have to do full updates. This is fine for overnight process but when it comes to regular updates, it is a bit much to ask. Here are the links to Microsoft blogs of the release announcement: https://blogs.msdn.microsoft.com/dynamicsaxbi/2016/05/02/introducing-entity-store-for-dynamics-ax-2012-r3/ https://blogs.msdn.microsoft.com/intel/archives/185 The concept uses DIXF to do incremental updates to the secondary entity store database. This is done using change tracking which is enabled at the database level. One thing to note is, the entity store database should ideally be on a different server. Allowing you to have SQL 2014 or latest SQL 2016 installed. The entity store uses column store indexing which is super fast. Have a read of the whitepaper in the above links. Below is a diagram of what ...

Expose AX 2012 AIF services (SOAP) as RESTful web services

A colleague of mine Fabio Filardi has published his work on Github. It has two samples for the Expense services and UserSession services. He has documented it really well. Get onto it if you are going to expose your web services as RESTful. It does save you a lot of time. Github project https://github.com/ffilardi/AxaptaAPI Documentation under wiki https://github.com/ffilardi/axaptaapi/wiki   Here are some additional notes. Microsoft has documented it really well too. So, get your head around the concepts and the above links should be of great benefit to you. This is a good summary of the Azure service bus adapter with AX. http://blogs.msdn.com/b/aif/archive/2013/04/29/aif-windows-azure-service-bus-adapter.aspx Whitepaper from Microsoft on how to extend it. Microsoft provides an example by talking about mobile app. Concept is how to expose your web services securely outside the domain. https://www.microsoft.com/en-us/download/details.aspx?id=38413 Fabio has written a blog...

Multi threading–Adding run time tasks

Last year I posted about multi threaded operation using BOF Also uploaded a sample project you could use to test it out or use as a template. Multithreading with Business Operation Framework [AX 2012] One thing I picked up after testing it in a large scale project which required scheduling it on a non default (blank) batch group. This had a few issues: Originally I was using the  batchHeader.addTask(this.newTaskController(recIdSet)); Below are the two issues of using this method like this. 1. There is a known issue to set the controller execution mode to be Synchronous. Whitepaper: https://www.microsoft.com/en-us/download/details.aspx?id=29215 Screenshot of the known issue. This separates it as its own batch job which disappears after it is finished. This is not the desired result when we are adding tasks at runtime. We want to keep them as tasks under the main batch. 2. Another issue is it will set the batch group as the default batch (blank). In my case the blank bat...

AX7 Recurring File (folder) integration

The new Dynamics AX is 100% in the cloud and that means some complication when it comes to file based integration. The AOS is hosted on the cloud and has no way of accessing folders. What we have is web services which we can stream a file to. This is explained nicely in the wiki site. https://ax.help.dynamics.com/en/wiki/recurring-integrations/ Microsoft has released a github project to process local/network folders and stream to the web service. https://github.com/Microsoft/Dynamics-AX-Integration Run the DIXF sample .NET project and you will get this window. The future where I see this heading is using Azure Logic Apps . Azure Logic Apps allows you to integrate with multiple connectors. I hope we get AX as one of the connectors. Today you can make it work using a wrapper web API app with swagger. Then the fields are recognized as part of the user interface. These comments around Azure Logic is personal and not from Microsoft. The future is looking really cool.