Skip to main content

Posts

Showing posts from 2013

Data import export framework–Import sales order

You will notice if you try to import sales lines using the DIEF you will notice that the inventory transactions are not created. With some minor configuration changes you can get it working. Go to the Target entities and click on the Mapping details. Then on the SalesQty fields change the sequence to 100. So, it is the last field updated and also tick the “Call modifiedField method” flag. See the the result. This is based on AX 2012 R2 CU6. I haven’t tested this with the latest.

AX and Scrum: Story

I have posted previously on AX and Scrum this is just a continuation of my series. This post shall cover what a story is. A user story is a short description of what is needed. The main purpose of this is to be able to estimate the piece of work. Below is an actual story i have worked on. We could (should) have written this different. In scrum they teach you to write it in the perspective of the actor. For example: “As a work order user, I would like to create a work order and submit it to workflow. I would like to get alerts and notifications.” One thing we like to do in our team is set up Acceptance criteria's (those AC1 2 AC5 that you see in the screenshot). At the end of the day we use it to tell us a story is done. The next step for use once we have given it sized the story and accepted it into a sprint. We start putting some finer details. We break down the task. Our comment tasks that we use and to use to indicate a story is done are: Functional design – Doesn’t ha...

My first Dynamics AX 2012 Windows 8 App

I have recently created my first Windows 8 App and I thought I would write about my experience. My first starting point is to download this Starter Kit. Dynamics AX 2012 Windows 8 App Developer Starter Kit http://startwindaxapp.codeplex.com/ Then before you do this I would suggested you have a look at Martin’s blog. He has made some fixes. http://dev.goshoom.net/en/2013/03/ax2012-win-8-starter-kit/ Create a custom web service First task was to create a web service. I didn’t want to use a Document service. So, I created a custom service. I wont go through the details of creating a contract or anything but I will show what the method I need is. Create a windows 8 app With visual studio 2012 (latest update 3 installed) I created a new project of type Windows Store. This Grid view will create 3 *.xmal pages. See the screenshot below there is a preview on the right hand side. It shows a Grid view, a Group view, and a Item detailed view. This is where we call the web service to...

AX and Scrum: Automated testing

Scrum highly encourages you to do automated testing. A common thing I hear is “any (some) automated testing is better than none”. So, my advice is start somewhere. I am not going to go through all the detail of automated testing that we do but what I will cover is the Unit test framework . The unit test framework is in the MorphX IDE that allows you test your code. A click of a button you could run a whole bunch of automated tests. Below is a screen shot of an area we test heavily, our forecasting engine. The forecasting engine similar to master planning in standard AX. It recommends what work order should be done and when. eg. Every 100KM a service is required for your car. Or Every 6Month you do an oil change. Or on the 1st of of every month you do an inspection. All sorts of combinations. . Below is a simple test for testing calendar days. We document our test cases in a spreadsheet first. Writing what the input is and what the out come is. Then a developer writes a test suite o...

Bug: “The parameter pageUrl is missing or invalid” when importing web URL in AOT [AX2012 R2 CU6]

If you try and import a web URL in AX 2012 R2 CU6, you will get this error. Try it on any standard URLs and the bug is still there. For a work around put a backslash in front of the URL and it should work now. You could make a code fix but I think its best Microsoft fixes it. If you want to make the fix yourself then have a look at this method \Classes\sysEPWebPageDefinition\getPageUrl. It looks like it was introduced in CU6. You can even see the Microsoft bug number and what they tried to fix. They were trying to cater for leading backslash but ended up breaking it. I have logged it with Microsoft. I will update once I receive a response. Update 2013-10-03 - Hotfix was provided from Microsoft. KB Article Number (s) : 2894068   

AX and Scrum: Task board

I am going to talk about the task board today. A task board is used to keep track of our progress. On a daily basis we update how many hours we have remaining. Each swim lane shows the status of the task. Below is an example of my task board. This sprint below I was working on work order workflow. Each day on our daily scrum meeting we update the board on how many hours remaining for each task. On this board it is clear who has accepted the work. How many hours they have left and if the task is done. Multiple people can work on the same task.

How to fit address fields correctly in a Windows Envelope

I am still a subscriber of some Dynamics NAV blogs. Sometimes you find some things that related to both products AX and NAV. Claus wrote a great piece on making address fields fit in a window envelope (for SSRS). http://mibuso.com/blogs/clausl/2013/08/24/how-to-fit-address-fields-correctly-in-a-windows-envelope/ It got me thinking that I saw something like this when I did a purchase order report. Here it is. Notice how there is a clear text box. The property is set to CanShrink=False. This is to lock the position of the address so it does not move up if a we have the company logo not visible.

AX and Scrum: Setting up your environment

Scrum encourages version control. Below is the setup we have. Our development environment is local to all developers. When a unit of work is complete and meets best practice it is checked in. Then on a regular basis the Test environment will be updated using the TFS synchronise functionality. This should update the test environment will all checked in work. This diagram below illustrates this process. We have 3 environments for product development: Environment name AOS Comment Daxeam_Dev Developer machine Install on developers machine and TFS is enabled. Daxeam_Test AX6-AOS-TEST Installed on the server and TFS is enabled. When a developer is finished with a piece of functionality it is synced into this environment for testing. Ideally a nightly build is recommended to ensure that everything is fine and it can be picked at as soon as a problem occurs. We actually do this on the last 5 days of our sprint- every night. Daxeam_Release AX6-AOS-RELEASE Thi...

AX and Scrum: Product development (ISV)

Being recently certified as a scrum master through scrum alliance http://www.scrumalliance.org/ . I thought I would share some experiences through this blog. Last week I wrote about what I was working on for the last 2 years ( Daxeam – Enterprise asset management solution for Dynamics AX). Continuing with the spirit of sharing. I will try to post how we are building our product and provide some examples. Our development methodology of choice is Scrum. What is scrum? “An agile framework that allows us to focus on delivering the highest business value in the shortest time.” Mike Cohn – “Introduction to Scrum Methodology” It is an incremental and iterative approach to development. Why scrum? The biggest advantage of scrum for me is that it allows the team to deliver the highest business value first. Then on top of that each sprint release is a potentially shippable product. Yes – in AX any mod is shippable but what scrum does is it formalize this for. Rather than being reactive,...

ISV solution for maintenance [AX 2012]

Today I will talk about something I am passionate about and have been working on for the last 2 years. This is Daxeam . The name Daxeam is a mash up of two words. DAX  for Dynamics AX and EAM for Enterprise asset management . It is a maintenance solution built from the ground up on AX 2012. Which means we took full advantage of new tools and right way of developing. It is Certified for Dynamics AX. You can find more detail on pinpoint and the Daxeam website. http://pinpoint.microsoft.com/en-au/applications/daxeam-asset-maintenance-for-microsoft-dynamics-ax-users-4295032381 Daxeam revolves around: asset and keeping track of assets. Cost, meters, structures etc work orders – budgeting hours and items. Capturing feedback. Workflow. forecasting, scheduling and planning – Preventative maintenance. Detailed scheduling with capacity. warranty and permits – triggers for warranties … Why am I writing this today you may ask? I am planning on blogging a little bit every week abo...

Purchase requisition error “The total, internal size of the records in your joined SELECT statement is 51314 bytes, but…” [AX 2012 R2]

In AX 2012 R2 you might get this on the purchase requisition form. This happens because a lot of fields have been deleted as part of R2 and new ones added on the purchase requisition line table. The total, internal size of the records in your joined SELECT statement is 51314 bytes, but Microsoft Dynamics is by default performance-tuned not to exceed 49152 bytes. It is strongly recommended that you split your table(s) into smaller units. Alternatively, you have to specify a 'Maximum buffer size' value of 51 Kbytes or higher on the 'Database Tuning' tab page in the Microsoft Dynamics AX Server Configuration Utility. The default value is 24 Kbytes. Exit Microsoft Dynamics immediately, and follow the directives above. Use of the table(s) will cause unpredictable results. Solution Turn off the upgrade config keys. You should have these turn off in your production environments.

Duplicate a company in AX 2012

I have heard from a few people struggling to duplicate a company in AX 2012. So, I decided to try it out my self. The recommended approach is to use dat/def export and import. There is a good article on technet. Import duplicate company data to use for testing [AX 2012] I  have had 1 failed and 1 successful duplicate attempt. I will explain the steps that worked for me. 1. Create your new Legal entity 2. Set up the Ledger form which is a shared table. I selected the same account structures as the company I was copying from. 3. Create a definition group to export the data from main source company. If I didnt want master data such as customers, vendors etc. I would untick Main group. Included shared tables in my export. Now export your dat/def. 4. Now I imported without shared tables. 5. The result is good. Chart of accounts and posting profiles all work fine. Vendors, customers imported fine (note: the vendor uses the same partyId as the source company).   Sum...

Refresh caller form [AX 2012]

There are a few ways to refresh a caller form. You may notice in AX2012 sometimes calling research(true) causes the record to jump to the starting position. The right way is to reread the references data sources before calling the research(true). Below is some sample code I use. Code: /// <summary> /// Refresh the caller form by calling the research(true) which does not work. /// research(True) alone will jump the cursor to the begining (either first or last) record. /// </summary> /// <remarks> /// Taken from form InventTableInventoryDimensionGroups.closeOk() /// </remarks> public void refreshCaller() { Common common; FormDataSource callingFormDataSource; common = element.args().record(); if (common) { callingFormDataSource = common.dataSource(); if (callingFormDataSource) { // Referenced datasources must be reread before calling research as data has been modified beh...

Purchase requisition buying legal entity defaults from? [AX 2012]

When you have multi-company environment. A worker may be associated to multiple companies. You might wonder where the Buying legal entity is defaulted from. It takes the earliest employment start date for the worker. In the example above Ben Martens is associated to CERW starting on 01/01/2013. He is associated to CEE starting on 02/01/2013. Resulting on CERW being the default company.

How to run AX 2012 R2 image on Virtualbox

I have received a few questions regarding the new demo image for AX 2012 R2. How to run it using virtualbox. Demo image can be downloaded from here https://mbs.microsoft.com/customersource/downloads/servicepacks/AX2012DemoToolsMaterials.htm I had a post way back which was a step by step guide. http://dynamicsnavax.blogspot.com.au/2011/04/how-to-run-ax2012-hyperv-on-virtualbox.html This is still valid up to step 7. Then setting up the network is different. On the second adapter set up an Internal Network. The summary should look like this. (Even though below I categorised it as Win2008 by mistake – the image is Win2012. This is just a category and should not matter). Important parts are highlighted. One problem I had after unzipping the image, the file somehow was locked. I had to disconnect my drive and connect it back up. Then attached it. Now you can start your machine. Once the machine starts, you need to configure the network settings. There is a document available on th...

Test Data Transfer Tool (Beta) [AX 2012]

Recently Microsoft released a beta for transferring data called Test Data Transfer Tool (beta) for Microsoft Dynamics AX 2012 [AX 2012] As described on technet. This tool allows you to transfer data from one environment to a test environment (non-production) via a command line. Installation is very simple. Just follow the wizard. Once installed. In viewing the folder you find this. DP.exe is the main executable to run. An xpo which you can import in to AX. This is just 1 job that allows you to run it against your environment to create a meta data. This meta data looks like this and is found under the [Lists] folder. Under the lists folder you also find some exclude files. These files contain table names which are excluded as part of the export. ie. AIF setups, security setups etc. Now lets see it in action. Run an export via command line. This will generate a file like below in the specified directory. Refer to technet for detail on what each file is.

Create a custom data import export framework entity[AX 2012]

Previously I had created a simple job to import Ledger alias . This post I will look at doing the same with the Data import export framework. There is no entity in the DIEF (Data import export framework) to import ledger alias. So, we have to create a new one. You can follow the Microsoft technet article but I will show you some screenshots here. http://technet.microsoft.com/en-us/library/jj933277.aspx One big thing you will realise is that it isn’t that straight forward for a non-developer. But for a developer it should be relatively easy to create a powerful import entity. 1. Click on Data import export framework > Common > Custom entity wizard Select or enter the table name – in this case it is DimensionAlias. 2. Suggested names and options are set. Leave the default. 3. You will get a message about ForeignKey relationships. Just click yes. This will take some time. A few minutes. 4. You will get errors. 5. A private project will be created. In my case it didn’t...

Data Import/Export Framework– Error: SysDictTable object not intialized

Recently I was importing Positions using the Data Import/Export Framework (staging to target process). I got the mentioned error. After doing some debugging I found there was a table “ PayrollPositionDetails ” that was in one of the DMF tables “ DMFTargetEntityHierarchy ”. But the Payroll configuration key was turned off. I ended up deleting the record from the DMFTargetEntityHierarchy table. (Alt+F9 to delete from table browser). Reran the processing group and all worked.

Import ledger alias with a job [AX 2012]

I wrote a job to import the ledger alias in 2012. It is fairly straight forward if you have the DMF installed. Create a csv file with the following: End result will be: Code: //Name,Type,company,Account alias definition,initial focus //test,Shared,CEED,401100-CR_GEN1-OU_3566-Training,MainAccount static void importLedgerAccountAlias( Args _args) { //dialog AsciiIO asciiIO; Filename filename; NoYesId skipFirstLine; Container line; Dialog dialog; DialogField dialogFileName, dialogSkipFirstLine, dialogCountryRegionId; //tables DimensionAlias dimensionAlias ; Ledger ledger; //fields to import DimensionAliasName aliasName; DimensionAliasType aliasType; LedgerName ...

Event handler for a clean world [AX 2012]

Eventing has been covered in many blogs and Microsoft has documented it pretty well. I thought I should touch on it a little bit today to bring it back in our conversation. Below is an example of eventing that used. Say you wanted to extend the PurchLine table modifiedField method. In the old days you would modify the method directly. Making it dirty. If you had another ISV making a modification, they would do the same. Meaning, someone has to merge code. Have a look at the example below. PMF stands for Process Manufacturing which used to be separate from the foundation model and similarly BR stands for Brazil which is a country specific module. Both are done using event triggers. See the property they are called Post the method. Pointing to a class. The end result is”No code merging” at all. The only reason I would modify the method directly is if you needed to put your code in the middle of a long process. Long story short. Use eventing for a cleaner environment. Write your co...