Page 1 of 1

Sales Order Import Error

PostPosted: Tue Jan 20, 2015 12:50 pm
by SBarnes
Hi Guys

We are attempting to import a sales order (see attached XML) into version 7.00.101 through the order entry screen and receiving the attached error (see attached jpg), this file works fine as an import into 6.5.13.

Given the doucmentation on 7.00.101 on importing sales orders I believe it may be a case of the warehouse actually being missing and not the Debtor identifier (as the account number is there and read fine under 6.5.13) being missing as is being reported by Jiwa.

Are you able to confirm that this may be the case?

Thanks as alway for any help.

Re: Sales Order Import Error  Topic is solved

PostPosted: Tue Jan 20, 2015 4:53 pm
by Mike.Sheen
SBarnes wrote:We are attempting to import a sales order (see attached XML) into version 7.00.101 through the order entry screen and receiving the attached error (see attached jpg), this file works fine as an import into 6.5.13.

Given the doucmentation on 7.00.101 on importing sales orders I believe it may be a case of the warehouse actually being missing and not the Debtor identifier (as the account number is there and read fine under 6.5.13) being missing as is being reported by Jiwa.

Are you able to confirm that this may be the case?

Thanks as alway for any help.


Hi Stuart,

The XML namespaces can be important and there are some missing namespaces in the xml document you supplied - Jiwa 6 didn't care about namespaces much because we actually coded the import manually for each document - this was extremely laborious and prone to coding errors - so in version 7 we instead made a bunch of POCO's and we deserialize (sic) to them automagically using the .NET Framework (System.Xml.Serialization namespace) - but this introduced a need to be sometimes more explicit about what namespace an XML element maps to.

The easy way to find out if you're missing a namespace, is export the document in version 7 and examine the XML - any nodes with xmlns=" in it need to have that same namespace set when importing an xml document also.

In the case of your supplied document - it's only two nodes - there debtor and the Lines nodes - so:

Code: Select all
<Debtor>

becomes:
Code: Select all
<Debtor xmlns="JiwaFinancials.Jiwa.JiwaSales.SalesOrder.XML">


And

Code: Select all
<Lines>

becomes:
Code: Select all
<Lines xmlns="JiwaFinancials.Jiwa.JiwaSales.SalesOrder.XML">


Make those changes and the document imports (modified version of your XML document attached - this will be importable in Version 7). You don't need to supply the warehouse information unless you want to import the document into a warehouse different from the current warehouse - what the current warehouse is in the context of an import will depend on how it is being imported and the configuration.

1046 - BARNES STUART - N1046-23Oct2014113242.xml
Modified XML document to use namespaces where needed.
(1.57 KiB) Downloaded 178 times


Mike

EDIT: I should note that <JiwaDocument Type="SalesOrder"> in your document is currently supported, but obsolete - instead you should use <JiwaDocument xmlns:jiwa="http://www.jiwa.com.au/xml/schemas" Type="JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder">

Re: Sales Order Import Error

PostPosted: Tue Jan 20, 2015 5:01 pm
by SBarnes
Mike,
thanks for the quick response