Refresh Listpage from Child form AX 2012

You often open a dialog or drop dialog when you are working with another form. As a result, you might want to refresh the parent form after you finish the action on the dialog or drop dialog form. However, not every dialog form requires that you update the calling form. Typically, you refresh the parent form when the information that you provide in the dialog form appears on that form.

To refresh a parent form,you must write your code in Child form by Override method CloseOk and write the below code.

public void closeOk()
    FormRun formRun;
    // Get an instance of the calling form.
    formRun = element.args().caller();
    // If the caller is a form, refresh that form.

100% working : Fatal exception performing AXRDCE transformation step. The report cannot be rendered. Please contact your system administrator.

Hello Guys,

Today I came with new issue in AX Report.

Few days back my report was working fine.

But today it showed me something weird information while opening the report.

Fatal exception performing AXRDCE transformation step. The report cannot be rendered. Please contact your system administrator. Continue reading

Cannot create a record in Table () , The record already exists.

Sometime you tried to insert some record in the table, if the system shows Cannot create a record in Table () , The record already exists. Generally we know that, this issues is caused due to Duplicate value. But here is the trick, so even i have checked the Index values which is allow duplicate yes. But still why this issue.. Basically we know that dynamics AX has invisible Index in every Table which is Recid, so this Recid is generating from SystemSequences Table( field nextval). So this SystemSequences  table contains every table Id and its next recid value in nextval field, so if it has a value with an already issued record id, you can increase the number.  To access this SystemSequences table you have to use SQL Management studio, Better it’s recommended to stay away from this table.


Hope you enjoyed.

Drillthrough Report in SSRS

Hi Guys, Have a Good Day!. Hope you are doing Good.

Today I’m going to share you how to developDrillthrough report in SSRS.

Confused ?

Don’t worry. Let me explain in short manner. Drillthrough report is a report that user can opens by clicking a link within another report. For example, We are listing All the Vendors and want to iterate vendors to all of his Purchase Orders and to their Purchase Order Details.


For more Details DrillThrough Reports in SSRS

We are going to illustrates the following tasks:
• Creating a Report Model project. 
• Creating reports 
• Vendor list 
• Purchase order list 
• Purchase order details 
• Providing drill-through action under designs 
• Saving the report to AOT and deploying it to the Report Server.
 Continue reading 

Move File from One Folder to Another Folder using X++

Hi Guys . I hope you are doing Good.

Today i’m going to share you that , how to move a File from One Folder to another folder using X++.

Here we can achieve this with the Help of WINAPI(Windows Application Programming Interface). Even though we can do Copy a file, delete a file, Create Directory, getting the file Size, etc. Refer more Details WINAPI

static void MoveFilesFromFoldertoAnotherFolder(Args _args)
 FilenameOpen fileNameOpen;
 DialogField dialogFileName;
 Dialog dialog;
 Filename filePath;
 Filename fileName;
 Filename fileType;
 FileName DestinationPath;
DestinationPath = @'C:\Users\saadullah\Desktop\Dest\'; // Define your Destination Path
 dialog = new Dialog("Move Files");
// AX 2009
 dialogFilename = dialog.addField(typeId(FileNameOpen));
// AX 2012
 // dialogFileName = dialog.addField(extendedTypeStr(FileNameOpen));
 dialog.filenameLookupTitle("Select File");
 dialog.caption("Move File");
filenameOpen = dialogFilename.value();
 [filePath, fileName, fileType] = fileNameSplit(fileNameOpen);
// MoveFile - The Original File won't be available once it's moved into destination path
WinAPI::moveFile(fileNameOpen, DestinationPath+FileName+FileType);
// CopyFile - The Original File will be available even if it's moved into destination path
 //WinAPI::copyFile(fileNameOpen, DestinationPath+FileName+FileType);
// DeleteFile - Delete the Selected File
 // If u need to Use this in Form Take look in AOT > Forms > Tutorial_Form_File

Collecting AOT object Properties Details in to Excel

One of the user posted in DUG that he required the list of all Classes and its properties from AOT to extract into Excel..  So, here is my solution…..

static void Export_Classes_propertied(Args _args)
    SysExcelApplication xlsApplication;
    SysExcelWorkBooks xlsWorkBookCollection;
    SysExcelWorkBook xlsWorkBook;
    SysExcelWorkSheets xlsWorkSheetCollection;
    SysExcelWorkSheet xlsWorkSheet;
    SysExcelRange xlsRange;
    int row = 1;
    str fileName;
    TreeNode classesNode = TreeNode::findNode(@'\Classes');
    TreeNodeIterator iterator = ClassesNode.AOTiterator();
    TreeNode classNode =;
    ClassName   className;
    UtilElements utilElements;
    System.DateTime CreatedSysDate, ModifiedDate;
    utcdatetime UtcCreatedDate, UtcModifiedDate;
    str StrCreatedDate, strModifiedDate;
    fileName = "C:\\Users\\saadullah\\Desktop\\Class.xlsx";  // Define your Excel Path

    //Initialize Excel instance
    xlsApplication = SysExcelApplication::construct();
    //Open Excel document
    //Create Excel WorkBook and WorkSheet
    xlsWorkBookCollection = xlsApplication.workbooks();
    xlsWorkBook = xlsWorkBookCollection.add();
    xlsWorkSheetCollection = xlsWorkBook.worksheets();
    xlsWorkSheet = xlsWorkSheetCollection.itemFromNum(1);

    //Excel columns captions

    while (classNode)
        className = classNode.treeNodeName();
        select utilElements
            where utilElements.RecordType == UtilElementType::Class
            && utilElements.Name == className;
        UtcCreatedDate = utilElements.createdDateTime;
        CreatedSysDate = Global::utcDateTime2SystemDateTime(UtcCreatedDate);
        UtcCreatedDate = Global::CLRSystemDateTime2UtcDateTime(CreatedSysDate);
        StrCreatedDate = DateTimeUtil::toStr(UtcCreatedDate);
        UtcModifiedDate = utilElements.modifiedDateTime;
        ModifiedDate = Global::utcDateTime2SystemDateTime(UtcModifiedDate);
        UtcModifiedDate = Global::CLRSystemDateTime2UtcDateTime(ModifiedDate);
        strModifiedDate = DateTimeUtil::toStr(UtcCreatedDate);

        classNode =;

    //Check whether the document already exists

    //Save Excel document
    //Open Excel document

    //Close Excel

Period is not Open

Hi Guys..

I have started with SCM , i have created one PO then im trying to do Packing Slip by filling the Packing Slip #, But it showing Period is not Open on my given Paking Slip Date.

the reason behind the error is there is no Fiscal Period for my packing Slip date.

So i have create Period in General Ledger->Setup->Periods->Periods

Problem solved….