Browse by Tags

Tagged Content List
  • Blog Post: Working with Images (BLOBS) between Dynamics Ax and external applications (UPDATED: 06/01/2010)

    (updated the 05/01/2010 and 06/01/2010) The idea Whenever you need to transfer data in a platform specific format (like Images), the easiest way of doing this is to create an envelope (in Xml) and put the data in an encoded format in this envelope. Here’s a schema that shows such a scenario:   The...
  • Blog Post: Memory leaks and profiling with .Net

    I wrote some moths ago an article about the GC and highlighted some particularities (unsafe and unmanaged code, disposing and finalizing, etc). When you are developing with .Net you will be sometimes faced to memory or resource leaks. Especially if you are using the BC.Net, since the BC.Net is using...
  • Blog Post: RPC error 1702 when calling a WinAPI method from a batch job

    You probably already noticed that error messages are sometimes not really helpful when you are trying to understand a problem. The following code creates such misleading error message: 1: public void run() 2: { 3: ; 4: if (WinApi::folderExists( @"c:\temp\")) 5: info("Folder exists...
  • Blog Post: The CLR for X++ programmers

    Dynamics Ax offers since Ax4 a .Net support ( BC.Net, EP and CLR objects with X++ ). As a matter of fact .Net will have a more and more important influence on Dynamics Ax since .Net is the glue of the Microsoft product stack . Sharepoint, BizTalk, SQL Server, Analysis Services, Microsoft Project, Workflow...
  • Blog Post: Passing CLR-object between an Ax-client and the AOS

    As explained on msdn you can’t pass an CLR-object between a Ax-client and the AOS. So the following example will work for the client-to-client but will fail for the client-to-server scenario: The code for the CLR-class: 1: using System; 2: 3: namespace Samples 4: { 5: public class Customer 6: ...
  • Blog Post: Handling .Net exceptions with X++

    In my last blog I was talking about casting CLR-objects in X++. In the code example you might have noticed the following code: 1: catch (Exception::CLRError) 2: { 3: //we'll discuss this later... 4: } Well, handling CLR-objects isn’t that easy. But fortunately you can find...
  • Blog Post: Casting CLR-objects with X++

    Casting CLR-objects with X++ isn’t that obvious as it is in .Net languages as C# or even VB.Net. The following code will not compile because of the incompatibility of the two types System.Net.WebRequest and System.Net.HttpWebRequest even if you are allowed to upcast in any .Net language the WebRequest...
  • Blog Post: Adding dynamically UserControls to a report with X++

    This is a pretty simple example how to add an UserControl to an existing Report. But since the documentation isn’t talking a lot about here’s the code: public boolean fetch() { ReportSection reportSection; ReportTextControl textControl; ; reportSection = element. design() .autoDesignSpecs(...
  • Blog Post: X++ in the BC.Net AppDomain and on the AOS

    As I already wrote before , the BC.Net is an Ax-client and as an Ax-client able to execute X++-code. So your X++ method are by default executed within the calling AppDomain . In order to identify the AppDomain in which the X++ is executed we write two methods (GetClientProcess and GetServerProcess...
  • Blog Post: Printer friendly EP pages – Part II

    Some days ago I presented a quite simple way to have printer friendly EP pages . Since sometimes it’s good to have different solutions here’s another solution from Anders K. Jacobsen here and here . You just have to create a new master-page (based on the EP default one) and redesign it with the Sharepoint...
  • Blog Post: Troubleshooting a simple BC.Net application

    Here's a simple checklist if you have problems to connect to the AOS (Dynamics Ax 4) with the BC.Net. Your code might look like this: 1: Microsoft.Dynamics.BusinessConnectorNet.Axapta ax; 2: string configuration = " C:\\Sample.axc " ; //see step 3 3: 4: ax = new Microsoft.Dynamics.BusinessConnectorNet...
  • Blog Post: Phantom CLR-objects with X++

    Some weeks ago I got the following code: 1: try 2: { 3: iop = new InteropPermission(InteropKind::ClrInterop); 4: iop.assert(); 5: 6: fileInfo = new System.IO.FileInfo(filename); 7: 8: if (WinAPI::fileExists(filename)) 9: { 10: fileInfo.Delete(); 11: } 12: fileInfo.Create(); 13: } 14: catch 15:...
  • Blog Post: Down, up, super and base

    Sometimes the programming language is determining the perspective. Last week I read the definition of downcasting on Wikipedia : In object-oriented programming , downcasting or type refinement is the act of casting a pointer or a reference to a base class to one to a derived class. I think this...
Page 1 of 1 (13 items)