Posts

Showing posts from December, 2019

AX 2012: How to enable or disable execute business operation in CIL using X++

Image
Hi Readers, Today, in this post we are going to tell you a very important topic about execute business operation in CIL, you can enable or disable execute business operation in CIL using X++. Copy the below code and paste it in AX job using AOT. // Created By: Chirag Gupta // Created Date: 27-Dec-2019 // Summary: This job code will be used for enable/disable 'Execute business operation in CIL' checkbox. static void PKA_SetCILExecution(Args _args) {     #LOCALMACRO.FLAG_ExecBusinessOpsWithInterpreter (1 << 10) #ENDMACRO     UserInfo            userInfo;     // setEnable = false; To disable Execute business operation in CIL     // setEnable = true; To enable Execute business operation in CIL     boolean             setEnabled = false;     ttsBegin;     while select forUpdate DebugInfo from userInfo         where userInfo.accountType  == UserAccountType::ADUser             && userInfo.enable      == NoYes::Yes    

AX 2012: How to merge table fields using AX compare tool

Image
Hi Folks, Today, in this post we are going to learn how we can merge table fields using AX compare tool. By default this functionality is disabled in AX. Please follow the below steps: 1) SysCompare class is the core class behind this utility. By adding this single line of code (i.e. highlighted in snapshot below) in selectionChanged method of SysCompare class we can also use this utility for merging of table fields. 2) Navigate to AOT\Classes\SysCompare\selectionChanged (selectionChanged is method name) 3) Right click on selectionChanged Method and click on View Code. 4) Write the following code. allowInsert = true; 5) Please see the screenshot below for your reference. 6) Now after adding this line, we can see the arrow symbol against the table fields too which is used for adding code into the server and it will work like a boom. 7) Please note that modification in SysCompare class may result difficulties in future upgrade of the software as it is a frame