Microsoft Dynamics 365 Blog

How to import default site and warehouse locations for a product using services (AIF) 

8 min read

I have recently had questions around how to import default site and warehouse locations for products when using AIF, so I thought an explanation and an example here might be helpful. Three tables need to have the correct Dimension ID relationships setup in order for the item todefault the correct Site/Warehouse combination. Within AX, you can set these Read more

0 Comments

Dynamics AX 2012 Services: How to process big messages using File adapter 

2 min read

Sometimes when you try to process big XML messages using File adapter you can get error: The request failed with the following error: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://schemas.microsoft.com/dynamics/2011/01/services:serviceName. The InnerException message was ‘Maximum number of items that can be Read more

0 Comments

Debugging Services in AX 2012 

1 min read

Regardless of the adapter type you choose, services in AX 2012 run as IL code – even if you are using the file adapter.  To debug IL codeyou must use Visual Studio. The steps for debugging a service are: On the AOS, install the AX Application Explorer from the Microsoft Dynamics AX CD by choosing Read more

0 Comments

Calling the Update Operation on Services in AX 2012 

17 min read

Calling the update operation on web services can range from simpleto very complicated depending on the entities/tables you are updating.  If the entity you are calling is not a dateeffective entity, then the service’s update method is easy to call.  You can tell if a table is date effective by going in theAOT to the Read more

0 Comments

Override AllowEditOnCreate when creating records through a service 

1 min read

I had a case recently in which they were creating records using the DocuRefService. The problem was that an error occurred stating “Field <x>  must be filled in”, even though the field mentioned had been specified in the code. The error occurred on these fields… RefCompanyId RefRecId RefTableId   As it turned out, all had a Mandatory property of Yes Read more

0 Comments

AIF XML file generator 

1 min read

Creating an xml file for the file adapter to call an AIF service on AX 2012 can be very difficult.  This tool is aimed at helping you create the XML file.  The directions for how you use it are below.  Instructions From the attached zip file copy both the axdTool.exe and axdTool.exe.config files into the same directory. Modify the axdTool.exe.config using Notepad, Visual Read more

0 Comments

SSRS error in AX2012 – An item with the same key has already been added 

1 min read

Recently came across this issue which was that a particualr report would no longer run -at all. Everytime you run it an error is recorded in the SSRS error log (default location is: C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles) that looks something like this: webserver!ReportServer_0-12!598!03/01/2012-17:57:57:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has occurred during Read more

0 Comments

Calling the Query Service 

7 min read

In AX 2012 some system services were added to perform generic functions like retrieving security or AOT node information.  To me the most interesting system service is the Query service.  This service allows you to perform a query against whatever tables you want from a service call.  On the call you can specify a field list, range, sort, etc.  The Read more

0 Comments

Calling the InventTransferJournalService in AX 2012 

1 min read

I received a question on how to call this service.  The code below creates an inventory transfer journal for me in the demo data: TransferJournalServiceClient client = new TransferJournalServiceClient(); CallContext context = new CallContext();            context.Company = “ceu”;   AxdTransferJournal journal = new AxdTransferJournal(); AxdEntity_InventJournalTable journalHeader = new AxdEntity_InventJournalTable(); journalHeader.JournalNameId = “ITrf”;   AxdEntity_InventJournalTrans inventJournalTrans = Read more

0 Comments

AIF general journal services require the journal type to be Daily and the account type to be Ledger 

1 min read

In Class\LedgerJournalTransType, method validateAccountType, there is a new validation for AX2009 that checks an incoming AIF Journal Type. If the LedgerJournalTable.JournalType is ‘Daily‘, then the validation requires the incoming LedgerJournalTrans.AccountType to be ‘Ledger’. The development team specifically limited the functionality of the services to Daily journal types and account types of Ledger because that is all Read more

0 Comments

Importing zip codes into AX via AIF 

2 min read

If you are importing addresses into AX you will discover that the zip codes in your addresses need to exist in AX before you can successfully import the addresses.  This is true regardless of the tool you are using to perform the imports.  If you are using AIF there isn’t an out-of-the-box service within AX form zip code imports.  The existing DirAddressService Read more

0 Comments