Here is a great little article from Ashok kancheti on the sequence of methods on Forms in AX2012
Tag: X++
SQL Analysis Services
Using Dynamics ‘AX .NET Business Connector’ to access Dynamics AX 4.0 from .NET world
by Bo Jensen •
So, this is a really interesting integration aspect between AX and .NET apps. We want to access AX business logic (or data, transactions, etc.) from the .NET world. 🙂
Microsoft Dynamics Ax
Accessing datasource field properties – Axaptapedia
by Bo Jensen •
Often it is useful to be able to access the datasource field properties on a form through X++. This is essential for modifying the allowEdit property at run-time for example.
Microsoft Dynamics Ax
List in X++ / Dynamics AX | Dynamics AX – Development Blog
by Bo Jensen •
List is a type of data structure and collections, it can contain unlimited items, in x++, list can be created of several Types(specified in the Types base enum), the type must be specified on the declaration and it cannot be changed after the initialization. There are some classes exists to enumerated and iterate the…
Microsoft Dynamics Ax
How to find All USR Layer Elements in AOT
by Bo Jensen •
How to Find all the elements which in present in USR layer To find all USR layer elements in AOT , you can write job with following code, when you will run this job it will create a new project named “TheAxapta_UsrObject”. In this Project you find all elements which is present in USR layer…
Microsoft Dynamics Ax
Ronnie H. Hegelund: AX 2012 X++ compilation from a .NET developers perspective
by Bo Jensen •
Here is a very useful explanation on X++ code vs. CIL code in Axapta 2012 from Ronnie Hegelund.
Microsoft Dynamics Ax
Create batch job through X++ code ~ IT Pro Ramblings
by Bo Jensen •
If you need to execute code in batch, here is an example of how to add a batch job for the corresponding RunBaseBatch class.
Microsoft Dynamics Ax
How to Assert multiple file IO permission
by Bo Jensen •
server static void CAP_copyFile(FilenameOpen _attachmentFilename, str _attachmentsFolder){Set permissionSet; ; // Revert permissionsCodeAccessPermission::revertAssert();permissionSet = new Set(Types::Class);permissionSet.add(new FileIoPermission(_attachmentFilename,’r’));permissionSet.add(new FileIoPermission(_attachmentsFolder,’w’));CodeAccessPermission::assertMultiple(permissionSet);// Move to processed folder// BP Deviation Documented winAPI::copyFile(_attachmentFilename,_attachmentsFolder,true);CodeAccessPermission::revertAssert();} H K Srikanth Dynamics Axapta Blog: How to Assert multiple file IO permission
Microsoft Dynamics Ax
Mukesh Hirwani – Dynamics Ax: Creating Vendors thru X++ in AX 2012
by Bo Jensen •
Here are come methods for all steps of creating new vendors in Ax2012 from dirparty to logistic and electronic addresses.
Microsoft Dynamics Ax
InventTrans Marking in Ax 3.0 via X++
by Bo Jensen •
How do you mark 1 line to another using AX 3.0 in X++? I’ve looked through the code using the inventMarking form but can’t quite get it to work via coding. Basically in all my coding examples, the findMovement function within the updateTmpMark doesn’t get called (since I somehow don’t have an _inventTrans). With the…
Microsoft Dynamics Ax
An alternative to the WinApi functions
by Bo Jensen •
The WinApi class holds some nice functions for file manipulation, like the WinApi::fileExistsWinApi::copyFileWinApi::deleteFileWinApi::moveFile I think every programmer has used one of those functions in Ax at one time or another, as they can be really helpful. They have one big drawback though: They need to be executed on the client tier. Trying to use…
Microsoft Dynamics Ax
Stack trace: Invalid attempt to call WinAPI::findFirstFile running in CIL on the client.
by Bo Jensen •
This error you will normally encounter when running a batch job. The issue is that batch processing doesn’t suppport WINAPI::findFirstFile method. Actually I was trying to find a file in the folder and moving to some other folder, you can use this alternative: public void run(){ System.IO.DirectoryInfo di; System.Type arrayType; System.Array array; System.IO.FileInfo fi; FilePath…
Microsoft Dynamics Ax
X++ code to Count Records in Query
by Bo Jensen •
Following code illustrates how we can use SysQuery::countTotal() method to get the number of records in Query. static void Query_cntRecords(Args _args) { Query query = new Query(); QueryRun queryRun; QueryBuildDataSource qbd; ; qbd = query.addDataSource(tablenum(CustTable)); queryRun = new QueryRun(query); info(strfmt("Total Records in Query %1",SysQuery::countTotal(queryRun))); } Microsoft Dynamics…
Microsoft Dynamics Ax, SQL Reporting Services
Simple SSRS report example by using Ax-Query and Ranges
by Bo Jensen •
In this report I am going to use the Ax-Query in the SSRS business logic and report will be generated by using SSRS Business logic.
Microsoft Dynamics Ax
Create Alert using X++ codes
by Bo Jensen •
Sometimes Infolog message is not sufficient enough for prompting information to users. It is possible to create alert message using code as an alternative. It is fairly simple to create alert message manually by just inserting a new record in EventTable where all the alert messages are stored. Below is a code snippet for…
Microsoft Dynamics Ax
Sending mail from AX using .NET Framework
by Bo Jensen •
Sometimes happen that SysMailer class (using CDO) is not the right solution for sending mails with attachments. There is a little sample of X++ Job that is using System.Net.Mail namespace to achieve same.
Microsoft Dynamics Ax
Dynamics: Import Data into AX from excel file
by Bo Jensen •
Import Data into AX from excel file
Microsoft Dynamics Ax
Export to Excel with X++ code ~ IT Pro Ramblings
by Bo Jensen •
Every user of Microsoft Dynamics AX knows the possibility and the ease-of-use to copy-paste data from a Dynamics AX grid to a Microsoft Excel worksheet. However, as Dynamics AX developer, you can achieve the same through X++ code, with a lot of more possibilities. In this post, I show an example of such an export…
Microsoft Dynamics Ax
How to print a report in AX 2009
by Bo Jensen •
Microsoft Dynamics Ax
Performing File IO with the TextIo Class [AX 2012]
by Bo Jensen •
The following X++ job code sample creates a file and writes to it. Next the code reads from the file, and prints every record to the Infolog. The use of the FileIOPermission class is also illustrated. FileIoPermission is used to assert that the current method has the authority to call another method that checks for…