Although we cannot use crossCompany keyword with insert_recordset command, we can still achieve the same functionality with some performance overhead as follows: static void JobCCIns(Args _args) { Table21 tab21; Table22 tab22; ttsBegin; while select crossCompany actionDate, name, dataAreaId from tab21 where tab21.actionDate > str2Date('1998-01-22', 321) { changeCompany(tab21.dataAreaId) { tab22 = null; tab22.actionDate = tab21.actionDate; tab22.name... Continue Reading →
AX 2012: Display methods – Different datasources – Same control
AX developers always come across a requirement of showing data from different datasources on the same control though these datasources should be related to each other. The solution to this requirement is to define display methods on the table which you choose to be the control datasource. Display methods are very handy for showing data... Continue Reading →
AX 2012: Generate next number sequence in X++
Often we do not need to generate the next number sequence manually in X++ since creating records by using forms the system automatically handles number sequence generation by invoking Number Sequence Framework. However, sometimes we need to generate number sequences manually in X++. The following code helps you to do that: static void numberSequence(Args _args)... Continue Reading →
AX 2012: Change Application Object Layer
Developers often need to change the current application object layer. For example, customizations in AX 2012 always take place in the USR layer. To change it:1. Go to Microsoft Dynamics AX 2012 Configuration 2. Click Manage then click Create configuration 3. Give it a suitable name and then click OK4. Switch to Developer tab and choose your... Continue Reading →
AX 2012: Reverse Engineering
If you are working on objects (Tables or Classes) you haven't designed then it is quite possible you could have an insight about these objects by reverse engineering them to either data model or object model. I came to know about an excellent reverse engineering tool in AX 2012, that's why sharing here for others.... Continue Reading →
AX 2012: Conditional Relations with Field Fixed and Related Field Fixed
Conditional relations are used to filter records in parent or related table. We can define conditional relations by specifying fields in a table relation as: Field Fixed OR Related Field Fixed Consider a scenario of a call center. The operator's responsibility is to receive calls and get the orders for a shoe store. The... Continue Reading →
AX 2012: X++ breakpoints not hitting?
If you are not hitting the breakpoints you set in X++ code as expected then make sure that your code isn't executed by the SysOperation Framework (formerly known as Business Operations Framework - BOF). If this is the case then you can force the AOS to debug your code in Dynamics AX Debugger by CLEARING... Continue Reading →
AX 2012: Creating cubes
Prerequisites Dynamics AX 2012 Dynamics AX 2012 Analysis Services SQL Server 2012 Once you have identified the tables and views which contain the relevant data for your BI report, you can begin creating perspectives (cubes) in the AOT. Let's suppose we have to develop a sales report for which the following tables/views contain the relevant... Continue Reading →