Database log error on AX 2009 with SQL Server 2008

On a database that is upgraded from AX 4.0 to AX 2009 running on SQL 2008 you may get following error while using database log: The target table ‘SYSDATABASELOG’ of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.. The SQL statement was: INSERT INTO SYSDATABASELOG…

1

How to move Demand Planner database to another server

Sometimes you need to move your existing Demand Planner database to another server. If you do this just using backup/restore, you will run into the issue while synchronizing the Demand Planner. The error you get is: Could not find ‘server name’ in sys.sysservers This is because Demand Planner uses fully qualified object names in some…

0

Conflict error when list of fields is used in select during update transaction

If you use this code, you will get an error on the line 29. The error message is following: Cannot edit a record in Table1 (Table1). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record. 1: static void updateTable1(Args _args) 2: { 3:…

3

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…

0

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…

0

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…

0

HOWTO: Print Word document from X++

You might need to print Word document directly from X++. Here’s a short sample how to do this:{ str document = “C:\\test.doc”; COM wordApplication; COM wordDocuments; COM wordDoc; ; // Create instance of Word application wordApplication = new COM(“Word.Application”); // Get documents property wordDocuments = wordApplication.Documents(); // Open document wordDoc = wordDocuments.Open(document); // Activate the…

0

Error ‘Invalid object name #ax_tmp_’

You may see similar error while posting ledger journal: Posting – Journal Journal: 000004_061 Voucher: 8004_062 Cannot select a record in (). The SQL database has issued an error. The journal is not posted and the update is canceled. SQL error description: [Microsoft][SQL Native Client][SQL Server]Invalid object name ‘#ax_tmp_dmo3_52_0’. This error is caused by collecting…

0

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…

0

HOWTO: Dynamicaly load picture from base64 string into image on form in X++

You may want to load an image from base64 coded string. Then there is a code sample how to achieve it. First is needed to put an “Window” controll on the form with name ex. “imageWindow” and then modify “run()” method of Form. String then could be loaded from database, generated by .NET (for example…

1