Display methods in Form unbound control for Microsoft Dynamics 365 for Operation(D365 or O365)

A Display method is used to display a calculation or data from another table.  The method modifier display is added to the beginning of the method definition line to allow the return value to be displayed on a form. Display methods can be created either on a table or on a form DataSource.  If it … Continue reading Display methods in Form unbound control for Microsoft Dynamics 365 for Operation(D365 or O365)

Convert CSV to EXCEL file in AX 2012

  static void ConvertCSVtoEXCEL(Args _args) { #Excel SysExcelApplication excel; SysExcelWorkBooks books; Filename excelFileName; Filename csvFileName; ; csvFileName = 'C:\\<.....>\\TEST17.csv'; excelFileName = 'C:\\<.....>\\2.xlsx'; excel = SysExcelApplication::construct( ); excel.displayAlerts (false); books = excel.workbooks( ); books.open(csvFileName,0,false,2,"","",false,#xlWindows,",",false,false,1,false,false,1,false); books.item(1).saveAs(excelFileName); excel.quit() ; }

How to build dynamic query for Budget Amount in X++ using Classes

Dear Friends, public AmountCur getBudgetAmount(Transdate _fromDate,Transdate _toDate,container _mainAccount,container _dim = conNull()) { QueryBuildDataSource    qbdsLine,qbdsHeader,qbdsViewActual,qbdsAttrActual,qbdsViewMain,qbdsAttrMain;    QueryRun                qRun;    BudgetTransactionLine   budgetLine;    AmountCur               amount;    #define.ProductLines('ProductLines')    #define.MainAccount('MainAccount')    #define.Fy("FY2015")    #define.Main("Main")    ;    queryBudget = new Query();    … Continue reading How to build dynamic query for Budget Amount in X++ using Classes

Remove a Financial Dimension Value

Here is a job that can help you remove or blank out a financial dimension. Note the Dimensions before executing this job Job static void sgxRemoveWorkerDimension(Args _args) { /*      * We will Remove a worker dimension in this example     */ CustTable                       custTable = CustTable::find(‘CUS-00004’); //Customer Record containing Financial Dimension DimensionSHA1Hash               hash; //To store … Continue reading Remove a Financial Dimension Value

Merge multiple pdf’s in to single pdf report [using X++ in Dynamics AX 2012]

Friends, It’s been long time since I have posted, as you all know work always keeps us busy. Few days back, there was a requirement to merge multiple pdf’s in to single pdf in Dynamics AX 2012.[Still works for 5.0/2009] This article will help you how to achieve this. Thanks to open source dll “pdfSharp”. … Continue reading Merge multiple pdf’s in to single pdf report [using X++ in Dynamics AX 2012]

FormAutoLookupFactory class and methods in AX 2012 to perform form lookups

Friends, FormAutoLookupFactory class has been newly introduced in AX 2012 which will help for form lookups on controls [strings, integers], Reference controls etc. by returning formRun class object Create a new form as shown below with a new string edit control Override the lookup method of the String Edit and add the below code public … Continue reading FormAutoLookupFactory class and methods in AX 2012 to perform form lookups