Skip to main content

Posts

Showing posts from January, 2016

AX 7 - Technical Insights

AX 7 is impending with a radical technical and structural change in the world of Microsoft ERP, Dynamics AX, in contrast to what we got in current version AX 2012. This is a soft indication to all developers to get ready to adopt this change nippily. There is a lot to learn on AX 7 development while supporting\working with current versions of Dynamics AX :( Back to file system; Yes, with AX 7 we are back to file system. Any change (technical) we make in application is saved into file (XML file) at your disk. Before we talk about the main artefacts involved in AX 7 development and the approach we will be using while developing in AX 7 world. Let's put some glance on Development environment how will it looks like, what we (developer) will have in our DEV box. Visual Studio will be used for all development stuff;  MS  developed visual studio extensions using standard Visual Studio extensions to enable the development of X++ code and AX 7 metadata in Visual Stu

AX 2012: File existance check

Multiple ways to check file existance in AX 2012; Client side check, does not work with batch job WinAPI::fileExists(_fileName); Server side check which works for run base batch too public boolean getFileExists(filepath _fileName) {    System.IO.FileInfo   fileInfo;     new InteropPermission(InteropKind::ClrInterop).assert();    fileInfo = new System.IO.FileInfo(_fileName);     return fileInfo.get_Exists(); }

AX 2012 - How to retrieve meeting (appointment) status from Outlook

Mi crosoft Dynamics AX 2012 provides a very convenient way to synchronize outlook tasks, contacts and appointments back into AX.  MSDN topics describe the integration in details. https://technet.microsoft.com/en-us/library/aa498242.aspx https://technet.microsoft.com/en-us/library/gg230659.aspx Let's discuss the main motive of this post; How can you retrieve the meeting (appointment)  status  from outlook back to AX 2012. Before I show you where and what code need to add or change, I will show the existing functionality how it works. Go to Home > Periodic > Microsoft outlook synchronization > Synchronize Here you can see, be default it tries to sync Contacts, Tasks and Appointments within provided date range. I will focus on Appointments for this post and sync Appointments only, Let's assume I have following meeting (appointment) response in my outlook, remember it was a meeting invitation which I sent from AX and now I have their responses back into m

Calling/Opening AX form through X++

Sample piece of code to open AX form through X++ static void OpenForm_ThroughCode(Args _args) {     Args                            args;     Object                          formRun;     // open form     args = new Args();     args.name( formstr (FormName));     formRun = classfactory.formRunClass(args);     formRun.init();     formRun.run();     formRun.wait(); } If you want to pass a record to open a form args = new Args(); args.record(ProjTable::find('PR00001')); args.name( formstr (FormName)); formRun = classfactory.formRunClass(args); formRun.init(); formRun.run(); formRun.wait(); How to retrieve these args on caller form's init() public void init() {     ProjTable   projTableLocal;        super ();        projTableLocal = element.args().record();    }

How to implement Runbase form in AX

Today I had a requirement that allow users to run Outlook synchronization process in batch rather sync it manually using out of the box functionality. Let's have a look on existing functionality and then extend it to achieve the requirement of running it in batch. Existing functionality in AX Home> Periodic > Synchronize [AOT form name is smmOutlookSyncrhonization ] As you can see someone has to manually sync outlook emails to AX acvitities or viceversa. Extended functionality in AX Let's implement this functionality in batch so users can set recurrence the Sync. Create a new class; class SyncOutLookEmails_RunbaseForm extends RunBaseBatch {     // Packed     TransDate            testDate; // I am using this variable for own testing purpose     #define.CurrentVersion( 2 )     #define.Version1( 2 )     #localmacro.CurrentList         testDate     #endmacro } public Object dialog() {