Dynamics Ax

Moving objects between layers

Today I am working at a customer site and today’s task is to move all objects from the USR layer to the VAR layer. (Don’t ask why but due to licensing we could not work in the VAR layer) There is already data present, so we cannot just move the objects without further attention.           There […]

Header2Line functionality : Adding an extra field

It is possible to update fields on the purchase lines when the according field on the purchase header record changes. When you want to add a field to this functionality, this is what you need to do to make it work :  Add the field to the Header2LineUpdate field group   Add field in the […]

Dynamics AIF : Query Update Stacktrace

Today, when updating some records through AIF I got the following error : This is definitely not a clear error since the only thing was wrong is that the Update property was set to No instead of Yes on the Query’s datasource. Thanks to a collegue of mine (from artofcreation) to point this one out […]

Dynamics AIF : Null vs Empty string

Today I experienced that when using AIF through web services, you have to pay attention to the difference between an empty string and a null value. We created a service for inventory locations and we had the InventLocationId filled in by the AIF. But when calling the service we received an error everytime telling us […]

Dynamics AIF : Tracing Web Service calls

When using AIF through web services, you can be in the dark when you want to know what’s really going on in there. Additionally you can have trouble debugging the thing when you are running a Windows 2008 box. (Contacted Microsoft last week and the response was that debuggin AIF webservices does not work on […]

Dynamics AIF : Invalid child element in namespace

A couple of days ago, I encountered this problem while calling the InventInventLocation AIF web service’s create operation. System.ServiceModel.FaultException : Invalid document schema. The following error is reported : The element ‘InventLocation’ in namespace ‘http://schemas.microsoft.com/dynamics/2008/01/documents/InventLocation’ has invalid child element ‘InventLocationIdQuarantine’ in namespace ‘http://schemas.microsoft.com/dynamics/2008/01/documents/InventLocation’. List of possible elements expected: ‘InventLocationId’ in namespace ‘http://schemas.microsoft.com/dynamics/2008/01/documents/InventLocation’.  The error itself […]

Dynamics Ax Alerting multiple users (By email)

First things first… the original post that I found about this topic can be found here : http://dynamic-ax.co.uk/DynamicsAXAlertsToMultipleUsers.aspx But since the link to the xpo was broken , I created this post to put this online and make some minor changes. (Don’t mind some best practices stuff like labels, security keys, … because you’ll probably […]

Debug Alerts in Dynamics Ax 2009

Today I was creating some alert rules and needed to make some modifications to the alerting functionality. Something didn’t go quite as expected, so I wanted to debug the execution of an alert action. Here is how you can do it : Make sure the debug mode is set to ‘when breakpoint’ for the user […]

X++ run a process with user credentials

When you want to run for example a command prompt from within the X++ language, you can use the following code : Let’s assume that the following parameters were passed to the method : FileName : “C:\windows\system32\cmd.exe” Arguments : “” RunAsAdmin : true UseShellExecute : true WaitForExit : false   1 2 3 4 5 […]