Skip to main content

Posts

Showing posts with the label Data migration

Copy Company and Number Sequence Issue

When it comes to setting up multiple companies, stream lining the process can save you time and effort. One effective strategy is to establish a template company or select a source company to replicate from.  In this blog post, I won't go through how to use the copy company feature as there are many blogs out there and Microsoft has some good documentation. https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/copy-configuration What I will explain is an issue I faced when using it. I found that the copy number sequence isn't working as expected. It throws an error when used as part of the copy company. Number sequence feature: There are two check boxes for number sequence copy: Copy number sequence - this will add number sequence entities and when run, it will change company references in the staging table before processing to target. Reset to smallest value - this resets the number sequence if it is used back to its smallest value. In most cases b...

Find information about data entities in your system

Just bringing attention to this docs page. https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-entities-report I only saw it today and it has some nice scripts that you can run to generate information. Go to the  github  project it references and run the scripts. Script Outputs AggregateDataEntitiesReport.ps1 AggregateDataEntities.csv AggregateMeasuresReport.ps1 AggregateMeasures.csv DataEntityFieldReport.ps1 DataEntityFields.csv DataEntityReport.ps1 DataEntities.csv KPIReport.ps1 KPIs.csv LicenseCode-ConfigKeyReport.ps1 LicenseCodes.csv ConfigKeys.csv ConfigKeyGroups.csv MenuItems.csv SSRSReport.ps1 SSRSReports.csv TablesReport.ps1 Tables.csv This report takes awhile to run, but it produces output as it runs. WorkflowTypesReport.ps1 WorkflowTypes.csv The scripts use C:/, you will have to change to K:/ or where ever your application is sitting in. I just did a text replace "C:/" with "K:/". It will export your files under the users...

Import document handling (attachment) files #MSDyn365FO

Out of the box you have limited data entities for migrating attachments. If you search what is already in the AOT, you will see a few various examples. I suggest you look at the LedgerJournalAttachmentsEntity as it is the simplest and cleans to copy from. I wont go into detail but I will give a quick run down of what it looks like. Use the DocuRefEntity as your main datasource. It does most of the work for you. Set your table you want to import for as the child datasource Add the Key You will need to add the postLoad method. There is minor code to update the virtual field FileContents. Below is an export I did for the general journal attachments. The import zip structure should be the same way. It will create the usual artifacts such as the excel, manifest and package header xml files. You will see a Resources folder under that. If you drill down to the resources you will see the attachments. This is an export and it used the document GUID for uniqueness. The other thing is the extensi...

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...

Bringing copy company back [AX 2012]

Back in 2013 I wrote a blog post on how to duplicate a company. I basically summarised Microsoft's guide on MSDN. http://dynamicsnavax.blogspot.com.au/2013/07/duplicate-company-in-ax-2012.html The big issue with those steps are that it is very manual and can scare a lot of people. Imagine having to copy a company set up for 10 plus companies. This can be very tedious and time consuming. Plus there are some references that have to be set up manually like the journal names voucher series. So, why not automate. I have put my project on codeplex which you can download and use (READ here carefully). User guide Download the class from https://dax2012copycompany.codeplex.com/ under source codes tab Import it into your AOT Run the class NAVAX_CopyCompany – Right click Open. From company – Enter the from company id To company – Enter the new company id (if company doesn’t exit it will create it) Use record ID compression – RecIds are recreated and in sequence Release produc...

Data import export framework cleanup job explained [AX 2012]

Data import export framework has a clean up job in periodic menu. I hardly see people running it to clean up old staging table data. One thing people are worried about is deleting something that may not have been processed. Below are the conditions for the status.

Idea: Data Import Export Framework for importing journals

This is an Idea and not something inside standard. Most people have used Data Import/Export Framework for importing journals. It has been a big help and in this post I will discuss an idea that I think Microsoft should consider to develop. I leverage the DIXF framework for importing a general journal and making it flexible. Below is a screenshot of how simple it looks. I got dialog front end that has been created to run DIXF entities both import from source to staging, then staging to target in one shot.  These are some additional considerations here for this to work: Default journal name  - this can be done by configuring the mapping from source to staging Default journal number – this is something to be done in code Default line number – this is something to be done in code Default currency from the company – this is something to be done in code or configuration. I prefer to do it in code. Default the dimensions – this is something to be done in code Clean up per...

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.

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.

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...

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 ...