How to populate an Outlook Client by Creating a Mail Item, Attach a Report, and Send the Mail through AX 2009

Hi Folks, In AX, using SysMailer class we can compose a mail and send it through code in AX but if we would like to populate the outlook client by creating a mail item then attaching a report and also attaching the sender’s email address as well as subject to it then here is the…

Caching the display methods on Forms in AX 2009

AX Forms with many display methods might have some performance issues. To increase the performance of these kinds of AX forms, the display method written in the table methods need to registered for caching. When the cached method is registered for caching then they perform calculations on fetched data, and then the calculated values are…

Effects of disabling a Configuration key for a table in AX 2012

Till AX 2009 version whenever the configuration key is disabled for a table the underlying table was dropped. But now when you disable the configuration key for a table that is listed in the AOT in AX 2012, the corresponding table in the underlying database management system is not dropped. Now when you modify a…

Merge two records from one table in AX 2009

In AX 2009, you can merge two records by using the merge() function in a table. For Example if you have posted a project with different department dimensions and now if you would like to merge two records of department dimension then this merge function can be helpful. The sample code is here as follows:…

Rename a Primary Key in AX through code

In this post, I am going to discuss about how to rename a primary key in AX. The renaming can be done for any record using the CCPrimaryKey Class. Let us suppose, if Customer Id 1000 has to be renamed as Cust_1000 then it will be renamed in all the tables(SalesTable, CustTable, SalesQuotationTable etc.,) wherever…

Create Delete Actions through code in AX

Hi Folks, It has been a long time, since I have posted any blog because of my busy project schedule…………. In this post, I am going to discuss on how to create delete actions through code in AX. Let us create a delete action in InventTable for a testTable. SysDictTable table; Treenode treeNode, datreeNode; table…

Get all Error Messages of Infolog in the desired language into a string and return it to external application

If you want to get all the error messages in the infolog in a desired language then just put this small code snippet and run it in a job. infolog.language(LanguageId); then whole UI of AX Client will be changed to the desired language and we will get the error messages into the infolog in that…

Insert / Delete / Update records into an external SQL database from AX using x++

Inserting/Deleting/Updating records into an external SQL database from AX 2009 using x++ can be done using ADO Classes in AX. This can be told from the following code snippet. In the below code snippet CCADOConnection is used to establish a connection with the external database and CCADOCommand is used to execute the command on the…

|

Paging in a Query(Query run)/Paging while retrieving the records from a query

Today, I have a found a new function in QueryRun class and thought of sharing it here in this post. Its use can be found while integrating AX with some external applications. I am sure that everyone has used queryrun class in x++ code. I have found out a special function in QueryRun Class with…