Welcome to MSDN Blogs Sign in | Join | Help

“Request Failed” Error in AIF

One of the SDETs on our team recently made me aware of a somewhat unintuitive error message that you might receive when sending a message to your AX installation using AIF. In the inbound XML message, the elements must be in alphabetical order. If they are not in the correct order, you may see a message that looks something like this real-world example:

The request failed with the following error:  The element 'SalesTable' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder' has invalid child element 'LanguageId' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'.

List of possible elements expected: 'QuotationId, ReceiptDateConfirmed, ReceiptDateRequested, RecId, RecVersion, Reservation, ReturnDeadline, ReturnItemNum, ReturnReasonCodeId, ReturnReplacementCreated, ReturnReplacementId, ReturnStatus, SalesGroup, SalesId, SalesName, SalesOriginId, SalesPoolId, SalesResponsible, SalesStatus, SalesTaker, SalesType, SalesUnitId, SettleVoucher, ShipCarrierAccount, ShipCarrierAccountCode, ShipCarrierBlindShipment, ShipCarrierDeliveryContact, ShipCarrierDlvType, ShipCarrierExpeditedShipment, ShipCarrierFuelSurcharge, ShipCarrierID, ShipCarrierResidential, ShippingDateConfirmed, ShippingDateRequested, smmCampaignId, smmSalesAmountTotal, StatProcId, TaxGroup, totalBalance, TotalCashDiscount, TotalInvoice, TotalMiscCharges, TotalSalesTax, TransactionCode, Transport, URL, VATNum, SalesLine, DocuRefHeader, MarkupTransHeader' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'

As you can see, the error message doesn’t exactly come out and say “Hey, your XML elements aren’t in alphabetical order.” It more hints around about it.

This error is returned when the inbound message is validated. So if you encounter this error, you’ll want to start troubleshooting by checking the source XML and the order of the elements.

For more information about document schemas in AIF on MSDN, click here.
Posted by dsiebold | 0 Comments

Find User Settings in the SysLastValue Table

Throughout AX, data is often saved from forms, classes, and other objects so that when you run those objects again, the user’s last values are pre-populated for you. For example, when you open and close a form, the last location of the form on your screen is stored so when you open it again, it opens in the same spot.

I recently discovered that there’s an AX table called SysLastValue that stores this information. This isn’t a standard table, but rather it’s a system table. To see what’s stored in it, you need to open the AOT and navigate to System Documentation > Tables > SysLastValue. If you expand the table node, you see all the methods that are available from that table. To see what’s in the table, you can right-click it and select Add-Ins > Table browser and voila, you can browse through the last value settings.

The actual values are stored in a blob in the Value field. This means you can only view all of the last values for a particular object, you can’t see the individual values in this table view. You can do that through code though. You can find the reference doc for this table on MSDN and a Bing search also turns up some good results.

Posted by dsiebold | 0 Comments

Keyboard Shortcuts for AX 2009

Recently, I was cleaning out my e-mail and came across a document that contains keyboard shortcuts for AX 2009. I found these shortcuts so handy for my own use, I felt compelled to share. To give credit where it’s due, this document was created by David Kidder, an SDET on the AX development team. Thanks, David!

This handy-dandy document lists some of the most-used accelerator keys, for example, Alt+F1 to show the Navigation Pane when it’s in auto-hide mode. The .docx file is attached to this blog post (look for the teeny tiny paper clip below), so feel free to download.

AX Tutorials in the AOT

I’m always on the lookout for gems of information that might help you AX developers out there. So when I found out about the AX tutorials, my first thought was, How come I’ve never heard of these before? But it’s not always about me, because the thought immediately following that one was, Hey, this would be some good information to share.

 

These are not tutorials in the strict sense of the word. They are objects in the AOT. These objects are of different types such as classes, tables, reports, etc. They show you how to implement different functionality in AX by giving you a working example.

 

These artifacts were part of AX when it shipped originally. So let me state straight way that some of them haven’t been updated and they are not included in the SDK documentation. That said, they still provide a useful reference for learning about programming in AX.

 

The following table contains all the tutorial objects that are in Dynamics AX 2009. To find out where they are:

 

1.     Click on the very top node in the AOT.

2.     Right-click and select Find.

3.     In the Search field, select All nodes.

4.     In the Named field, enter the name of the tutorial object.

5.     Click OK.

 

The find will return a list of nodes where the tutorial object is found. You can infer the object type by its location. Some objects have the same name, for example, Tutorial_RunbaseForm is both a form and a class.

 

Hope these are useful to you.

 

 

#

Name

1.           

tutorial_AddressStateCustomer

2.           

Tutorial_Apply

3.           

tutorial_AxWebFrameworkCRUD

4.           

tutorial_AxWebFrameworkJoins

5.           

tutorial_Cheque

6.           

tutorial_ColourLines

7.           

Tutorial_Comparable

8.           

Tutorial_CompareContextProvider

9.           

tutorial_ContactPersons

10.       

tutorial_Customer

11.       

tutorial_CustomerCreate

12.       

tutorial_CustomerDetail

13.       

tutorial_CustomerEdit

14.       

tutorial_CustomerInfo

15.       

tutorial_CustomerList

16.       

tutorial_Customers

17.       

tutorial_CustomizedSumDescription

18.       

tutorial_CustTableInfo

19.       

tutorial_DataSetView

20.       

tutorial_Date

21.       

tutorial_Dde_Client

22.       

tutorial_Dde_Server

23.       

Tutorial_DDETest

24.       

tutorial_DefaultDataWizard

25.       

tutorial_EPCustTableList

26.       

Tutorial_EventProcessor

27.       

tutorial_FontInfo

28.       

tutorial_Form_AddControl

29.       

tutorial_Form_Apply

30.       

tutorial_Form_Arrange

31.       

tutorial_Form_Controls

32.       

tutorial_Form_DisplayOptions

33.       

tutorial_Form_EnumerateControls

34.       

tutorial_Form_File

35.       

tutorial_Form_freeform

36.       

Tutorial_Form_Graph

37.       

tutorial_Form_groupOption

38.       

tutorial_Form_Join

39.       

tutorial_Form_ListControl

40.       

tutorial_Form_ListControl_CheckBox

41.       

tutorial_Form_Split

42.       

tutorial_Form_StateList

43.       

tutorial_Form_Table

44.       

tutorial_Form_TreeControl

45.       

tutorial_Form_Windowingrid

46.       

Tutorial_Grid

47.       

tutorial_HelloWorld

48.       

tutorial_HelpPane

49.       

tutorial_HorseRace

50.       

tutorial_Joins

51.       

tutorial_JoinsExtended

52.       

Tutorial_Journal

53.       

tutorial_JournalName

54.       

tutorial_JournalTable

55.       

tutorial_JournalTransMovement

56.       

tutorial_Ledger

57.       

tutorial_ListPanel

58.       

tutorial_Lookup

59.       

tutorial_LookupMultiSelect

60.       

tutorial_LookupMultiSelectDropDialog

61.       

tutorial_Memory

62.       

tutorial_NotesSpanningPages

63.       

tutorial_Paging

64.       

tutorial_PopupMenu

65.       

tutorial_Positioning

66.       

tutorial_Progress

67.       

tutorial_Prompt

68.       

tutorial_Properties

69.       

tutorial_Recurrence

70.       

tutorial_Reset

71.       

tutorial_Resources

72.       

Tutorial_RunbaseBatch

73.       

Tutorial_RunbaseForm

74.       

Tutorial_RunbaseReport

75.       

tutorial_RunbaseReportStd

76.       

tutorial_SectionTemplateCust

77.       

tutorial_SectionTemplateVend

78.       

Tutorial_ShowAviFiles

79.       

tutorial_ShowIcons

80.       

tutorial_SumPerSubField

81.       

tutorial_SumPerSubFieldDate

82.       

Tutorial_SysESign

83.       

tutorial_SysLastValue

84.       

Tutorial_SysSign

85.       

tutorial_TableDescription

86.       

tutorial_Tetris

87.       

tutorial_Thread

88.       

Tutorial_ThreadWork

89.       

tutorial_Timer

90.       

tutorial_Toolbar

91.       

Tutorial_WebControls

92.       

Tutorial_WebGrid

93.       

Tutorial_WorkflowProcessor

94.       

tutorial_XSL

95.       

TutorialCodeProfiler

96.       

TutorialDefaultData

97.       

TutorialDefaultDataWizard

98.       

TutorialDefaultDataWizardDelete

99.       

TutorialDefData

100.    

TutorialDefDataId

101.    

TutorialJournalCheck

102.    

TutorialJournalCheckDelete

103.    

TutorialJournalCheckPost

104.    

TutorialJournalCheckPSC

105.    

TutorialJournalCreateExample

106.    

TutorialJournalFormTrans

107.    

TutorialJournalId

108.    

TutorialJournalIdOriginal

109.    

TutorialJournalName

110.    

TutorialJournalNameId

111.    

TutorialJournalPost

112.    

TutorialJournalPostDelete

113.    

TutorialJournalPostPSC

114.    

TutorialJournalStatic

115.    

TutorialJournalTable

116.    

TutorialJournalTableData

117.    

TutorialJournalTrans

118.    

TutorialJournalTransData

119.    

TutorialJournalVoucherChange

120.    

TutorialJournalVoucherObject

121.    

TutorialLedgerInAccountStatementFormat1

122.    

TutorialLedgerVoucher

123.    

TutorialThread

 

Posted by dsiebold | 0 Comments

AX SDK on MSDN Now Wiki-ized

If you're an AX developer, I have some good news: the Dynamics AX 2009 developer documentation on MSDN is now enabled for community content (aka wiki). So now you can post comments, code samples, bug reports, kudos and brickbats on any particular topic.

You’ve most likely seen the wiki in action on MSDN if you’ve ever browsed the help for .NET or SQL Server or any of the other developer products. Just scroll to the bottom of any topic and you’ll see the Community Content pane. Click the Add new content link to sign in and start talking. You will need to have a valid Live ID to sign in and post a comment. Currently, only the AX 2009 help is wiki enabled, but we plan to enable this feature on the AX 4.0 help soon.

Let the discussions commence!

 

Posted by dsiebold | 0 Comments

AX Developer Center Extreme Makeover

As part of the overall MSDN redesign, the Dynamics AX Developer Center is sporting a new look. The core navigation is still there, but many of the pages have been simplified to make it easier to find what you're looking for.

For more information about the overall MSDN redesign and what's in it for you, check out Soma's blog. Your feedback on how we can make the Dynamics AX Developer Center better is always welcome!

Posted by dsiebold | 0 Comments

Dynamics AX Doc Team at AXUG Summit - Stop By and See Us

The Microsoft Dynamics AX Content Publishing team (we write all the AX docs) is holding some roundtables at the AXUG Summit going on right now. Please come by and participate – we’d like to hear your feedback.

 

Here’s the schedule:

 

Day/Date

Time

Description

Location

Facilitators

Wednesday, Sept 16

3:30 PM

Communities and Social Media: Trends in Documentation

Ruby Gem Room

Erin Koffler, Stuart Macrae

Thursday, Sept 17

7:45 AM

Finding Information about Microsoft Dynamics AX

Coral Gem Room

David Robinson

Thursday, Sept 17

7:45 AM

Application Configuration Documentation

Ruby Gem Room

Erin Koffler, Stuart Macrae

 

Posted by dsiebold | 0 Comments

Looking for Dynamics AX 2009 Doc? Look No Further

This week is the annual AX User Group Summit 2009 in Chicago. The Dynamics AX Content Publishing team is there, and we have created a compendium of documentation resources for Microsoft Dynamics AX 2009.

 

In this document you’ll find a list of the documentation that’s available for the product with links to where it’s located. The list is segmented by the type of documentation:

 

·         User

·         System administrator

·         Developer

 

This document covers all the product documentation. If you’re looking for AIF-specific documentation resources, check out this blog post.

 

Not able to attend the conference? No problem. I have posted the document right here (you can download it by clicking the link next to the teeny-tiny paperclip below).  

Create a File from MSDN Content

I recently discovered that there’s a tool that allows you to create a help file (either .chm or .hxs) from content on MSDN and TechNet. It’s called Package This and is available on CodePlex. This is great if you want to download a bunch of information to review offline, say at a customer site or on a plane.

 

If you don’t know about CodePlex, it’s our open source hosting web site. It’s publicly available and you can download the source for all the projects hosted there.

 

When you download the Package This executable (I created a new folder called \Program Files\Package This and put it there) and run it, you’ll see the MSDN tree – or the table of contents (TOC) as we call it. You can toggle between MSDN and TechNet by using the Library menu item.

 

Package This Screen Shot

 

In the TOC, select the topics that you want to include in the file, and they appear in the list on the right-hand side. After you select what you want in the help file, just click File > Export to Hxs File or File > Export to Chm file.

 

On the up side, the utility does allow you to select a node and all of its children. Depending on how many children a node has, the select process can take a while.

 

On the down side, it doesn’t allow you to combine content from both MSDN and TechNet in a single file which is unfortunate. However, you could work around this problem by creating two help files (.chms) and compiling them in a collection. You can use the HTML Help compiler to do this.

 

Posted by dsiebold | 0 Comments

Message Encoding in AIF

Recently, I was on a mail thread that elucidated certain aspects of how AIF messages are encoded. So I thought I would share that info here.

 

In Microsoft Dynamics AX 2009, the default encoding is UTF-8. You can change the default in the global settings form by navigating to Basic > Setup > Application Integration Framework > Global settings.

 

The important thing to remember is that each endpoint has its own default encoding format, and that encoding is inherited from the encoding format specified in the global settings. So if you want to change the encoding on a single endpoint, you need to go to the endpoints form by navigating to Basic > Setup > Application Integration Framework > Endpoints > General tab.

 

If you change the default encoding format on the global settings form, it does not change the default encoding format on any existing endpoints. Only endpoints created after the change to the global settings will inherit the new global default encoding format.

 

Another important point to remember: Outbound documents (messages) that are being sent in response to an inbound request always use the encoding of the inbound request document.

 

The encoding formats supported by AX are:

 

·         UTF-8

·         UTF-16

·         UTF-16BE

·         GB18030

 

For more information than you’d ever want to know about Unicode encoding formats, check out the Unicode Consortium.

 

Posted by dsiebold | 0 Comments

Automate the AX Checklist

Sometimes you stumble upon something that has been around for a long time but you never knew about, so when you do find out about it, it’s like making a whole new discovery. This is how I felt when I found out you could automate the checklist that must be completed after you install Dynamics AX.

 

This automation can be a real time-saver if you are doing multiple AX installations. For instance, if you’re doing AX development and you have separate test and dev environments that you update on a regular basis.

 

First off, I tested this in AX 2009, but the functionality is available in 4.0 as well. Essentially, you create an XML configuration file and then run AX from the command line and point to that configuration file. The configuration file contains elements that correspond to the steps in the checklist.

 

Here’s the config file that I used to test with. As you can see, this file specifies

 

·         That the application should be compiled

·         That the license file should be loaded from the specified path

·         That the sample data should be imported from the specified path

·         That the database should be synchronized

 

<?xml version="1.0" ?>

<AxaptaAutoRun version="4.0"

    logFile="c:\temp\config\autorunerrlog"

    exitWhenDone="true">

<CompileApplication crossReference="false"/>

<LicenseInformation file="c:\temp\config\

    AxsetupLicense.txt" />

<DataImport file="c:\temp\config\40ExtendedData1380.dat"/>

<Synchronize/>

</AxaptaAutoRun>

 

So the first thing you do is install Dynamics AX. Then, you write your config file with the settings you need. Then, run AX on the command line and specify the config file with this command:

 

Ax32.exe -StartupCmd=AutoRun_c:\Configuration.XML

 

My sample config file shows only a subset of what you can do with the config file. You can add users, add companies, run an XPO, run code from the AOT, etc. See the SysAutoRun Class help on MSDN for more options.

 

One final note - the config file above specifies version 4.0. That will still work with version 2009, as long as the version number specified is <= the product version number, it will not be a problem.

Dynamics AX Goes Green

Early this year, we released the Environmental Sustainability Dashboard (ESD). This is a module that works with Dynamics AX 2009. This tool is not my area of expertise within AX, but I thought it was really cool so I wanted to mention it.

 

The dashboard allows you to configure your AX installation to track your energy consumption. You can use the dashboard reports to analyze the data you collect and find opportunities for reducing your footprint and maybe even saving your company some money at the same time.

 

Another benefit of the dashboard reports is that they provide information that you can share with customers, the media, government regulators or anyone that needs or wants to know about your organization’s environmental data.

 

Click here to see a short video that provides a nutshell version of how it works. As you’ll see in the video, the great thing about the ESD is that the tracking of energy usage is part of your organization’s everyday business process.

 

The ESD was released after AX 2009 as a targeted release. You can download it at https://mbs.microsoft.com/customersource/downloads/servicepacks/ax2009esd.htm?printpage=false&stext=sustainability. You’ll need a valid PartnerSource login to access it though.

Posted by dsiebold | 0 Comments

Microsoft Dynamics AX 2009 Services White Paper

At long last, a white paper about implementing new services and best practices for developers has been published. This document is chock-full of helpful tips for developers that are creating services in AX 2009.

 

Running the AIF Document Service Wizard is just the first step to creating a new service. Then you need to put the business logic code in and this paper gives you a jumping off point.

 

You’ll find recommendations for:

 

·         How to create the schema.

·         What fields are exposed by the query.

·         How to implement Ax<Table> classes.

·         How to handle defaulting and validation.

·         How service security works.

·         How to debug services.

 

Code on!

Posted by dsiebold | 0 Comments

Dynamics AX 2009 Book Ships

The updated version of Inside Microsoft Dynamics AX 2009 is now available. Check it out here.

Posted by dsiebold | 0 Comments

How to Create and Consume a Service – New AIF Webcast

If you’re using Dynamics AX 2009 and are new to services, there’s a new webcast that you’ll want to check out. It’s on Channel 9, and it was done by Sanjay Jain, ISV Architect Evangelist.

 

It gives you the nutshell version of how to:

 

·         Create a new service

·         Add a new service operation to the service

·         Publish the service

·         Consume that service

 

For more in-depth help on AX 2009, see the help content on MSDN and TechNet.

Posted by dsiebold | 0 Comments
Filed under: ,
More Posts Next page »
 
Page view tracker