Microsoft Dynamics AX Support

This blog contains posts by the Microsoft Dynamics AX Support Teams Worldwide

Requesting large packages across AX AIF can result in timeout errors after 30 seconds regardless of your timeout values

A common time out exception you may experience with NetTcp AIF calls in AX is: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was ’01:09:59.9770000′. This error can be deceptive… Read more

Calling the Update Operation on the SalesOrderService

The code is an example of how to call the update method on  sales order in AX 2012 using the SalesOrderService.   static void Main(string[] args)         {             //First find the order             AxdSalesOrder salesOrder = Program.FindOrder();             //Now update it             Program.UpdateOrder(salesOrder);         }           static AxdSalesOrder FindOrder()         {             CallContext context =… Read more

Calling the LedgerPurchaseInvoice Service in AX 2012

I had a blog comment requesting that I demonstrate how to call the LedgerPurchaseInvoice service so here you go:               //A purchase invoice created by this service = AP > Journals > Invoices > Invoice register             //Think it depends on which journal name you set up under AP > Setup > AP Parameters… Read more

Calling a web service from X++ code

This post describes how to call the AIF sales order service from X++ code.  The same approach can be used for calling any web service. In the AOT under the References node add a service reference specifying the wsdl location of the service, a .NET code namespace and a reference namespace.  An example of a wsdl url is: http://myMachine.myDomain/MicrosoftDynamicsAXAif50/salesorderservice.svc?wsdl Once… Read more

Updating customers via the Customer AIF service

We have received many questions in AX 2009 around how to update customers using the customer service in AIF.  People report errors like the following while trying to do updates: “The record in Address with record id <12345789> cannot be updated because the record has changed since last read.” To update customers set the DocumentHash of… Read more