Free Text Invoice AIF Service

Hi All,

I’m attempting to use the FreeTextInvoice service to … import free text invoices into AX via the AIF.

I’m running into a problem with the default dimensions. Now it seems, shall I say counter intuitive for an external system to need to be aware of dimension recids within AX, in order to create a line with a GL Code.

So in my tag I have the following tag, to attempt to insert the GL Code, (lets just assume that the external system knows what GL Code it needs to put each invoice line to)

schemas.microsoft.com/.../sharedtypes">](http://schemas.microsoft.com/dynamics/2008/01/sharedtypes)

MainAccount

1262

However when the AIF processes the file, I continually get the creation rejected, with the error ‘Main account does not exist’. It definitely does.

Has anybody else got around this problem? Am I doing something inherently wrong here? The documentation on how to create basic standard AIF docs with some kind of example is… well limited is a nice way of putting it.

Any help would be greatly appreciated.

Tyler

I wonder why so many people try to develop AIF service by manually crafting XML files and then just observing service response as if AX was a black box that can’t be debugged. I find it extremely unproductive.

  1. Don’t bother with XML tag names, namespaces and such things. Let Visual Studio to generate proxy classes for you, use these classes and let serialization details to WCF.

  2. If AX does something else than you expect, use the debugger to see why is that.

Hi Martin,

Appreciate the response.

I suppose the reason behind that is given that the 'AIF" is an ‘Application Integration Framework’ that’s purpose is to allow external systems to interact with AX, that may explain it.

In my instance I have a transformation engine/application that takes a number of files and formats from varying sources and I’m utilising that to transform these disparate files into a common format, that being an AIF XML format. The integration engine I’m being forced through does not have the luxury of calling WCF components, and given that the AIF provides a “File Adapter” to facilitate it’s the path of least resistance, allowing me to transform the files into the correct AIF format.

Now given that this particular issue seems to have tripped up more than just myself, I ask the question for two reasons.

  1. The answer may be simple and easily explained.

  2. and more importantly, it could then be logged here to help anyone else that may experience a similar problem

I come back to, the AIF is an integration framework that allows external systems to interact with AX, it does seem rather illogical to, having given an external facing interface to a system do the following,

  1. Not document it well.

  2. Seemingly expect the external system to aware of AX internal structures that even the user doesn’t know about.

I certainly could be approaching this very naively, and I apologise if my question is falling under the ‘101’ level of query

Again thanks for taking the time to respond.

That your final solution doesn’t use WCF doesn’t mean that you can’t use it for development. You should first develop working parts and then put them together rather than trying to do everything at once and then wonder which of many parts may be wrong. But it’s your time and energy to waste, so feel free to ignore any of my advices.

By the way, check another forum thread How to pass defaultDimensions in AIF document service XML(File system adapter).

Thanks Martin,

I’m certainly not ignoring the advice, my hope was that it was something, someone else had come across, or better yet that there was actual documentation on these services, that was useable.

Having to debug how to use standard, out of the box services via development environments instead of working off documented examples seems like the hard way. However, hard way it is.

Thanks for the link, that looks like it may have useful info there.

Tyler

My primary advice is not trying to build XML files (and figuring out the right format) by hand at all. It’s not necessary.