How to delete orphaned data remained from deleted company?

In AX 2009 it may happen that you delete a company but data related to this company remain in the database. You can use this script to delete this data: /* * Code Sample Disclaimer: * Microsoft provides programming examples for illustration only, * without warranty either expressed or implied, including, but not limited to,…


Error while calling Win API function on x64

When you are calling Win API function (or function from a native DLL) on x64 you get this error: An exception occurred when calling Function in Library name DLL library This happens only if the code calling the DLL function is running on server. The reason for this is that the DLLFunction class is not…


Rename object in TFS

You can get this error message while renaming object that is checked out from TFS. Unable to import Trying to import Table MFATable_test1 with ID 50003 ID already held by Table MFATable1 To rename the object you need to follow these steps: Right click the object in AOT and select Rename (without checking out the…


AX 2009 .NET Business Connector fails while creating instance of XmlDocument

RTM version (5.0.593.0) of .NET Business Connect fails with following exception while creating instance of XmlDocument class in X++ code. System.Runtime.InteropServices.SEHException: External component has thrown an exception. at AxCore_CallStatic(Char* , Char* , tagVARIANT* , Int32 , tagVARIANT* ) at Microsoft.Dynamics.BusinessConnectorNet.Axapta.CallStaticClassMethod(String className, String methodName, Object[] paramList) at Microsoft.Dynamics.BusinessConnectorNet.Axapta.CallStaticClassMethod(String className, String methodName) at BusinessLogic.DocumentationManager.GetXml() in D:\Development\AX\BC.NET Sample…


Importing addresses with RecID compression enabled

Sometimes you need to import addresses into AX 2009 and enable RecID compression. This import might result in an error:  Update of RecID-key xxxxxxxx failed for the register DirPartyAddressRelationshipMapping. To solve this you need to follow these steps: Restore the database Disable RecID unique index on the table affected by this issue Synchronize Import data…


Sending reports per e-mail from batch

I was facing an issue that no mails were arrived while sending invoices in PDF from a batch. Sending e-mails from a client worked fine. The reason is in enabled SMTP relaying on customer’s mail server and in \Classes\RunbaseReportStd\serverSendMail method. This method calls quickSend() method from SysMailer class. The first parameter of this method is…

1

HOWTO: Using WinAPI FindFirstFile, FindNextNext in Batch Jobs.

In batch job is not posible to call WinAPI functions WINAPI::FindFirstFile(..) and WINAPI::FindNextFile(…). This is limited only for code running on client. Sometimes is necesary have similar function for code running on server (or in batches). There is a code sample which is using .NET Framework. static void Job1(Args _args) { FilePath sFilePath; System.IO.DirectoryInfo di;…

1