Skip to main content

Posts

Showing posts with the label AX2012R2

Deploy a Web Api App for AX 2012 to Azure–part 1

Continuation from previous post. In this post I will show how  publish your solution to Azure. I assume you have followed the instruction from the GitHub wiki to download and configure. https://github.com/ffilardi/AxaptaAPI/wiki Now that you have done that. Lets deploy. Create a new Api App. You might have to search for it if its not available on the menu. Give it a name and select a Resource Group. Obviously pick a data centre location that is close to your AOS. If I am not sure, I like to use this site to find the closest with the lowest latency. http://www.azurespeed.com/ Now you have an empty Api App. Grab the Publish file by clicking the “Get publish profiles”. This is not necessary but if you have other developers who don’t have access but you want them to publish. This one of the ways. In Visual Studio right click on your project and click Publish. Follow the wizard. You can sign in and select the Azure resource to deploy it to. Otherwise, use the publish file to import and ...

KB3034554 - Ledger journal performance [AX 2012]

A bit of a spotlight on this KB. I wasn’t aware of for some time and now it is included in AX2012R3CU9. Problem was that each line insert/update/delete caused a tax calculation. This was more prominent when importing large journals (several thousand lines). The solution Microsoft provides in this KB is a technical solution. It gives you the ability to ignore tax calculations if you wanted to do it while importing (via AIF or custom code). I have written something previously that discusses this. http://dynamicsnavax.blogspot.com.au/2014/04/tips-to-improve-ledger-journal-import.html   https://fix.lcs.dynamics.com/Issue/Resolved/616114?kb=3034554&bugId=3360809&qc=0872aea67f72bae9e4f30e1e2f653e6071a7556b6589633dd4fdf521cd720f5b Note: This new field is not part of the DIXF journal entity. Here is a work around. Because the Fields in the query are set to Dynamic=No. Lets add it ourselves Right click and add the field. Refresh the target entity by either deleti...

How to debug xslt transformation using visual studio [AX 2012]

Dynamics AX 2012 has introduced the ability to transform an xml message using xslt. Refer to the technet article for more information on transformation of inbound ports http://technet.microsoft.com/en-us/library/hh352243.aspx Also see this nice blog post on importing bank reconciliation files using standard BAI formats  http://blogs.msdn.com/b/axsupport/archive/2014/05/20/advanced-bank-reconciliation-setup-in-ax-2012-r2.aspx Back to the topic - In this post I will show you how to debug and run the transformation in visual studio 2010. First thing you do is open up the xslt file with Visual Studio. You will see the xml editor tools on the toolbar. If you dont see it, then just right click the toolbar and add it by selecting the “XML Editor”. Now you can place a breakpoint in the document and click the start xslt debugging button (Alt +F5). First time you run it you will get to choose the input file. If you have run it before this will be defaulted. You can change it by goi...

Manipulate the controls on a list page [AX 2012]

With list pages in AX 2012 where there is no code on the form. The right way is to have the code in the ListPageInteraction class. With the ListPageInteraction class – manipulating controls is a little hard because there is no obvious formRun or controls to manipulated. You can do basic enabling/disabling but not full control. Below I will show how you can get the formRun. Below screenshot is what I had developed recently - where I added attributes dynamically to a list page. So, that it can be sorted and filtered on. I won’t give out the full code just yet. I might do it at a later time. :-) But I will give code snippets on how I manipulated the list page. I created a Display menu item that calls a class to launch the list page. Then in that method I called my newly created formInitialize method. A typical way to launch a list page through a class is like this. Code: formRun = SysListPageHelper::runFormWithModeledQuery(formName, querystr(MyListPage), "My new list page...

Upgrade analysis using Lifecycle Services (LCS) [AX 2012]

The nature of software is that you will have to upgrade or implement at some point. Dynamics AX is no different from any other software system out there. With Microsoft working hard on Lifecycle Services (LCS) site, doing an upgrade analysis has gotten a lot easier. Below is a diagram illustrating the process to produce your analysis report (Excel file). Below are steps on how to use LCS to produce the upgrade analysis file. 1. Go to LCS site ( https://lcs.dynamics.com ) 2. Create a new project and click on the Upgrade analysis 3. Enter the project name and select the AX version. Currently in the list there are 2009 SP1 and AX4SP2. Before you click on the Create button. Make sure to click on the Download link to download the Rapid Data Collector tool. 4. Now that you have created your project, go and install the Rapid Data Collector (do not run against your production – take a copy). 5. Install the Rapid Data Collector and it should be a simple executable that you can run. ...

Migrating from GP to AX using DIEF [AX 2012]

Today I found a hidden gem that I never noticed. It is actually in AX 2012 R2 CU7 and also in AX R3 (unchanged from the look of it). I was going to through some DMF classes and I stumbled across this interesting class DMFDefaultMappingGP. It has a number of select statements you can use to query GP to import into AX. Naming of the fields seem to have been done nicely, it should automatically map to the staging automaticly. I found nothing that calls these methods – only way I can think of is to copy the string and paste it into DIEF query. You will see some of the queries like InventTable and Project are empty. Either Microsoft started this and stopped after a while. I can see the vision Microsoft started off here. I will do some experimenting and see how it works out.

Open source Exchange rate provider on Codeplex [AX 2012]

Way back I had created an exchange rate provider using Yahoo! Finance services. So, today I thought I would share this code that has been sitting with me for a long time. I have created a Codeplex project to start the sharing. I want to also encourage others to start sharing if they have developed their own exchange rate provider using other services. I am more than happy to add anyone who wants to contribute as a developer or I can upload it for them (and mention their name on the main page). I think we can all benefit from these being freely available or if Microsoft can include it in their product eventually as standards. Visit: Exchange rate provider on Codeplex Download the Yahoo! Finance exchange provider class xpo, import it into your environment, compile + CIL compile, restart your client and start using it. Once you have done the right thing. It should be available for configuring. Then, you should be able to run it. More information to get you started: To learn on ho...

Tips to improve Ledger journal import performance [AX 2012]

There are a number of ways of importing ledger journals but with most you will realise it is quite slow with a lot of lines (100 plus lines). I have put a couple of tips to boost the performance. Remember these are bulk creation of journals and not posting issues. That is a whole other topic. Tip 1. Obvious but often forgotten. Remember that journal name setup – you have a number of options to generate the voucher number. If you leave it to generate when it balances – then this will kill your performance. Tip 2. On the insert method you will there is tax calculations which are deleted and recalculated every time you insert. If you can avoid calling this method and call it only for the last line per unique journal number, voucher number, and invoice. I won’t go into detail on how to code it. option 1: You can add a parameter and check that. option 2: Or you can write your code so the tax is not set – do your insert. Then set the tax groups after. But remember you will have to...

Release products using Data import export framework [AX 2012]

This is a question I hear quite often. When you import products how do you release the product to your multiple companies. Do you have to import it? The answer is quite simple but well hidden. No – you don’t have to import to the other companies. There is a field in the staging table called ReleaseProductCompany. If you pass the company name with a separator. Then on insert or update it will release it to those companies. The separator can be found on the Source data formats. Finally here is a screenshot of the code that releases the product into the companies.

Spell checker [AX 2012]

This post I will show how easy it is to use managed hosted controls (wcf). We will look at incorporating a text control with a spell checker enabled. We will work backwards, final result looks like this. Now lets go though it. Right click on your form and add a managed host. Select PresentationFramework and then the Textbox control. On the init method, enable the spell check. xpo can be downloaded from here for an example. http://goo.gl/fS2Stq

Microsoft Project Add-in technical deep dive [AX 2012]

Last post I cover how the Microsoft project add-in worked. This post I will look into how it looks from a technical perspective. First thing we had to do was deploy the service, this is because the add-in uses a specific service called ProjWBSService. I created an AOT project (*ProjWBS*) to show what the components make up the service. You will notice it is a document service. What is interesting how ever is how the updates are done. The query contains a view ProjWBSActivityView. Then the update, insert, delete methods are overridden to perform a custom update. The the file is reused and file path is stamp on the Hierarchy table. So, when you try to click on the button it either creates or just opens the one it is pointing to. That is it for now.

Microsoft Project Add-in overview [AX 2012]

Today I will cover on how the Microsoft project add-in works in AX 2012 R2 CU7. Setup the service To setup the service first time, go to the AOT and publish the Service group. Right click and Deploy Service Group Setup parameters Go the Project parameters fill in the Microsoft Project integration field group. In this example I will use Archived directory. Other option is SharePoint. Specify a folder – I would use a network shared path rather than your local drive. Setup the project Create a project but make sure to specify the calendar. Launch Microsoft project add-in On the Project list page, you will see a button to open in in Microsoft project. You will also see a new column called Microsoft Project – this indicates if it is linked to a Microsoft project file. When you open it in Microsoft project, you will see the Dynamics AX add-in. If you click on Add resources – you will get this dialog pop up. The Publish has a few options: Publish – It updates the linked ...