Posts

Showing posts from February, 2018

How to find Default Financial Dimensions (X++)

Hi, in this post i am goint to show you two ways of how to select default dimension values in AX 2012. 1) Traditional select codes:  You can do a "while select" or just "select firstonly" for your needs. You can get all dimensions with "while select"    and just one with the "select firstonly" as you know. But if you are going to use "select firstonly", you must specify the dimension attribute first. Let's assume that you need to find the default financial dimensions of a specific customer record; Select Firstonly: Below code shows you the Dimension Attribute name and value of the selected customer. CustTable custTable; DimensionAttributeValueSetItem DimensionAttributeValueSetItem; DimensionAttributeValue DimensionAttributeValue; DimensionAttribute DimensionAttribute; select firstonly custTable where custT

Publishing SSRS Reports

Hi, in this article i will explain how to publish your SSRS reports to reporting server. - Start "Microsoft Dynamics AX 2012 Powershell" with admin privileges. Use below commands which is suitable with your situation; - " Publish-AXReport -ReportName YourReportName " >>  Publishes one specific report (Must be used on the Reporting Server) - " Publish-AXReport -ReportName * " >>  Publishes all SSRS reports located in the AX system. (Must be used on the Reporting Server) - "  Publish-AXReport -ReportName YourReportName   -servicesAOSName NameOfTheAOS -servicesWSDLPort WSDLPortofTheAOS " >> Publishes a report for a specified AOS name and WSDL port.

Parallel Compile X++

Hi, I'm going to explain how to parallel compile and why. In Dynamics AX you can compile all AOT with right click and compile, but this process took so long (Nearly 6 hours). Thats why we can use parallel compile to finish the process early. Here how it ca be done; 1) Windows => Run => cmd 2)   Change directory to " C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin" 3) write the following command: "axbuild.exe xppcompileall /s=01 /w=03"  (s = AOS Id)   (w = number of processors) 4) Check the log file for errors.

How to read an Excel file

In this post, i will explain how to read an Excel file and write data from rows into AX system. Below job opens a dialog box and lets the user to select an excel file and then reads the excel starting from first row and transfers the cell data to a variable in Axapta. When the excel finished, application quits. static void readFromExcel (Args _args) { SysExcelApplication application; SysExcelWorkbooks workbooks; SysExcelWorkbook workbook; SysExcelWorksheets worksheets; SysExcelWorksheet worksheet; SysExcelCells cells; COMVariantType type; CommaIO comio; Container line; FileName filename; int row; ItemId exItemId; ItemName exItemName; Dialog dialog = new Dialog( "Select File and Path" ); DialogField DFPath; ; application