Posts

Showing posts from May, 2016

Dynamics AX : How to Merge Multiple PDF files into a single PDF file

Image
This Bolg will help you to merge Multiple PDF into a single PDF file. Thanks to open source dll “pdfSharp”. It made my life easier to convert the C# code to X++ by using the dll. The dll can be downloaded from the below link or you can google and get the dll from other sources http://pdfsharp.codeplex.com/ The pdfsharp.dll file can also be downloaded from the link below: https://drive.google.com/folderview?id=0BzqL3XWsezaCdUZFX3FHNHA0ZWM&usp=sharing Once the dll has been downloaded, you need to add the dll in Client\Bin folder as shown below. Then go to AOT >> References >> Add the  pdfSharp.dll  by using Add reference option and browse till the  pdfSharp.dll  in the bin folder. Now for this purpose I created a class as below: class MergePdf { } Added a static method in this class as below: static container findMatchingFiles(         str _folderPath     ,   str _filePattern   = '*.*') {     System.IO.DirectoryInfo     direct

Dynamics AX Data Upgrade : Table mapping

During data upgrade the mapping algorithm follows the following precedence for source and target table mapping: 1. Check special mapping – this is custom mapping as defined within pre-synchronize scripts 2. Try to map by name, e.g. SalesLine -> SalesLine (Salesline table exist on both source and target system) 3. Try map by DEL_ prefix, e.g. SalesLine -> DEL_SalesLine (salesline table on traget doesn’t exist but DEL_Salesline table exists) 4. Try to map by ID (Salesline or DEL_salesline table on target doesn’t exist but the ID of the Salesline table on source and target is same) 5. Otherwise, mapping error is reported and must be fixed!

Dynamics AX Data Upgrade : Valid Time State Key Error after Upgrading or Updating

Some times during Upgrades we face a compilation error  “Table does not contain a valid time state key. A unique index needs to be marked as a valid time state key.” Cause The index is disabled using  indexAllowDup  method, then properties  AlternateKey  and  ValidTimeStateKey  are reset to default value  No . ReleaseUpdateDB:: indexAllowDup ( new  DictIndex( tableNum (TableName), indexNum (TableName, DateEffectiveIndex))); The error starts to show up then indexes are not enabled correctly using method indexAllowNoDup : ReleaseUpdateDB:: indexAllowNoDup ( new  DictIndex( tableNum (TableName), indexNum (TableName, DateEffectiveIndex))); AlternateKey  and  ValidTimeStateKey  properties are not set using the code and then you start getting compilation error mentioned above. Solution You should use the method  indexAllowNoDupAndDateEffective  instead: ReleaseUpdateDB:: indexAllowNoDupAndDateEffective ( new  DictIndex( tableNum (TableName), indexNum (

Dynamics AX Data Upgrade Using State Transfer Tool

Image
Using the preprocessing upgrade state transfer tool: The preprocessing upgrade state transfer tool helps you minimize downtime during upgrade. The tool also helps you avoid putting an additional load on your production Microsoft Dynamics AX system while you prepare to upgrade it. This topic describes how to create a test system that is a replica of your production system, perform data preprocessing on the test system, and then transfer the completed preprocessing state back to the production system. How the State Transfer Tool Works: The state transfer tool operates on a Microsoft Dynamics AX source system where some of the tasks of the Preprocessing upgrade checklist have been completed. The tool analyzes the code in the upgrade preprocessing project to identify the upgrade staging and framework tables that are required to capture the state of the Preprocessing upgrade checklist. The tool then uses the Microsoft SQL Server Bulk Copy Program (BCP) utility to copy these tables to

Dynamics AX Data Upgrade Source Environment Tasks introduction

Image
The High level Steps Performed at Source System are as follow: Preparing the source database: This section lists the steps to prepare the source environment database.  Consider implementing trace flag 4199. This flag enables a number of SQL Server performance enhancements that are applicable to Microsoft Dynamics AX. These enhancements should improve the performance of the upgrade readiness and live preprocessing steps of the upgrade. For details about trace flag 4199, review the following KB article: http://support.microsoft.com/kb/974006 Note that trace flag 4199 is available in the following SQL Server builds:  SQL Server 2005 Service Pack 3 Cumulative Update 6  SQL Server 2008 Cumulative Update 7  SQL Server 2008 Service Pack 1 Cumulative Update 7  SQL Server 2008 R2  Consider increasing the frequency of transaction log backups. Also consider increasing the size of the transaction log to support the additional log space required for live preprocessing and li

Dynamics AX 2012 Data Upgrade Introduction

Image
In this post I will be introducing to the Microsoft Dynamics AX 2012 Data Upgrade, tasks involved in the Data Upgrade process along with some key points which must be considered before and during the upgrade process. Before getting started I would first like to introduce you to few key terminologies which will be used throughout the series of these posts:  Microsoft Dynamics AX 2012 Data Upgrade can be divided into two categories:   In-place upgrade   Upgrade from Older version i.e. AX 4.0 or AX 2009 Term In-place upgrade is referred to the upgrade from one version of Microsoft Dynamics AX 2012 to another i.e. AX 2012 R2 to AX 2012 R3. This type of upgrade requires no source-to-target workflow that is used when we upgrade from AX 4.0 or AX 2009. In this post and further upcoming post we will be focusing on the Data upgrade in AX 2012 from older versions i.e. AX 4.0 or AX 2009 which follows the source-to-target model. What is Source-To-Target Model? Upgrad

Data Upgrade Manual Bulk Copy and generation of Direct SQL Scripts using X++ Job

During data upgrade often it comes a requirement to run Bulk Copy for some tables which were unable to be Bulk Copied Before due to any reason (which could be table / field mapping issue etc..) Now if the particular tables were unable to be Bulk copied from source to target since there Direct Sql Script was not generated which is stored in ReleaseUpdateBulkCopyTable in AX 2012 in Field named 'DirectSQl' : To generate that DirectSQL script to perform Bulk Copy follow the following procedure: The class which handles the Bulk Copy process is 'ReleaseUpdateBulkCopyDB', few thing we will need prior to execute the below script is to Obtain the Source and Target connection string which could be obtaine from table 'RELEASEUPDATEBULKCOPYPARAMETERS',  Use the following SQL Script to fetch this information :  Select * from RELEASEUPDATEBULKCOPYPARAMETERS Copy the SourceConnectionString and TargetConnectionString and update the below X++ job : static void Bulk