Dynamics Search Engine

Tuesday, February 24, 2015

How to fix Data Migration Framework (DIXF) error in Microsoft Dynamics AX 2012 R3

How to fix Data Migration Framework (DIXF) error in Microsoft Dynamics AX 2012 R3

 
This article addresses:
How to resolve Data Import / Export Framework (DIXF) error.
How to resolve data upload error in Microsoft Dynamics AX 2012.
How to resolve error ‘could not load file or assembly … The system cannot find the file specified.




Applied on: Dynamics AX 2012 R3.
Prerequisite: Basic Dynamics AX 2012 programming knowledge.
Target audience: AX programmers.
Assumption: You are familiar with Dynamics AX 2012.

When you get an error to upload data using Data Migration Framework (DIXF), check below things.

- Data Import / Export Framework (DIXF) service should be installed on a computer running SQL Server Integration Services. This component provides the connection to SQL Server Integration Services.
In order to complete the installation, you must provide an account for the service to run as. AOS service account is recommended.
 

- AOS component should be installed on AOS server that connects the AOS to the Data Import/Export Framework service. If AOS component is installed correctly you should get a folder called  DataImportExportFramework under default location “C:\Program Files\Microsoft Dynamics AX\60” on AOS server. Inside this folder you should have:

DMFConfig
Microsoft.Dynamics.AX.Framework.Tools.DMF.DriverHelper
Microsoft.Dynamics.AX.Framework.Tools.DMF.SSISHelper
Microsoft.Dynamics.AX.Framework.Tools.DMF.SSISHelperService
Microsoft.Dynamics.AX.Framework.Tools.DMF.SSISHelperService.exe


- Client component should be installed on client system. It installs the user interface component of the Data Import/Export Framework. If client component is installed correctly the client bin folder should have 4 DLLs e.g.

Microsoft.Dynamics.AX.Framework.Tools.DMF.DriverHelper.dll, Microsoft.Dynamics.AX.Framework.Tools.DMF.Mapper.dll, Microsoft.Dynamics.AX.Framework.Tools.DMF.PreviewGrid.dll, Microsoft.Dynamics.AX.Framework.Tools.DMF.ServiceProxy.dll

The default location for these files is “C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin” on client machine. Your AOS server can be a client as well.
 

-     Open your AX client and go to Data import export framework module > Setup > Data import/export framework parameters. On this form you need to define a share folder path and validate. Important thing is the service account assigned to Data Import / Export Framework (DIXF) service on SQL server should have access to this folder.

 

-      On AOS server go to Start > Administrative Tools > Server Manager > Configuration > Local Users and Groups > Groups. In this Groups folder there must a group called Microsoft Dynamics AX Data Import Export Framework Service Users. In this group add service account (user ID) which you used for DIXF on SQL server. Also add users will be accessing DIXF.
 

-      Open your AX client and go to System administration > Setup > Services and Application Integration Framework > Inbound ports > make sure DMFService is activated.

 
Hope this was useful for you. Leave your comment below

Sunday, January 11, 2015

How to fix error Invalid object name tempdb.DBO and TRUNCATE TABLE tempdb. DBO in Microsoft Dynamics AX 2012

How to fix error Invalid object name tempdb.DBO and TRUNCATE TABLE tempdb. DBO in Microsoft Dynamics AX 2012.

This article explain how to resolve tempdb.DBO error and TRUNCATE TABLE tempdb. DBO when you do a posting in Microsoft Dynamics AX 2012

Applied on: Dynamics AX 2012 R3

Error:
SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'tempdb.DBO.t20143_ADF272F84AED47BF8B58C5DF75F56229'.

SQL statement: TRUNCATE TABLE tempdb."DBO".t20143_ADF272F84AED47BF8B58C5DF75F56229

Symptom:
Sometimes when you do posting in Microsoft Dynamics AX 2012 it throws an error which says like [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'tempdb.DBO.t20143_ADF272F84AED47BF8B58C5DF75F56229 also says SQL statement: TRUNCATE TABLE tempdb."DBO".t20143_ADF272F84AED47BF8B58C5DF75F56229.

Sample screenshot:


 
 
 
 
 
 
 

 
 
 
 
Resolution:
Solution is to restart the AOS.


 

Tuesday, January 6, 2015

How to read and insert record from a CSV file using X++ code into Microsoft Dynamics AX 2012 table

How to read and insert record from a CSV file using X++ code into Microsoft Dynamics AX 2012 table.

This article helps you to understand how to read data from a CSV file and insert into Microsoft Dynamics AX 2012 table.

Applied on: Dynamics AX 2012 R3.
Prerequisite
: Basic Dynamics AX 2012 programming knowledge.
Target audience
: AX programmers.
Assumption: You are familiar with Dynamics AX 2012 and CSV file


Below job inserts records from a CSV file to CustGroup table.

static void CustGroupCSVInsert(Args _args)
{
    Dialog          dialog  = new Dialog();
    DialogField     dialogField;
    AsciiIo         importFile;
    str             filePath,fileNameOnly;
    filetype        type;
    container       record;
    str             delimiter = ",";
    int             totalRecords;
    CustGroup       custGrp;

    dialogField=dialog.addField(extendedTypeStr(FilenameOpen),"Select File","Select file to import");
    dialog.caption("File Picker");
    dialog.filenameLookupFilter(['csv','*.csv']);

    if(!dialog.run())
        return;

    [filePath, fileNameOnly, type] = fileNameSplit(dialogField.value());
    importFile = new AsciiIo(dialogField.value(), 'R');

    if((!importFile) || (importFile.status() != IO_Status::Ok))
    {
        warning("Error in opening import file");
        throw(Exception::Error);
    }

    importFile.inFieldDelimiter(Delimiter);

    try
    {
        ttsbegin;
        custGrp.clear();
        record = importFile.read(); // First row - Column name - Header

        while(importFile.status() ==  IO_Status::Ok)
        {
            record = importFile.read();
            if(!record)
                break;

            totalRecords = totalRecords + 1;
            custGrp.clear();

            custGrp.CustGroup = conPeek(record, 1);
            custGrp.Name = conPeek(record,2);

            custGrp.insert();
        }
        ttscommit;
    }

    catch(Exception::Error)
    {
        Throw(Exception::Error);
    }

    info(strFmt("Total Read Records = %1",totalRecords));
}


Sample .CSV file image.