Sales Order Import Error  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Sales Order Import Error

Postby SBarnes » Tue Jan 20, 2015 12:50 pm

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.
Attachments
1046 - BARNES STUART - N1046-23Oct2014113242.xml
(1.47 KiB) Downloaded 160 times
jiwa 7 import error.jpg
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Sales Order Import Error  Topic is solved

Postby Mike.Sheen » Tue Jan 20, 2015 4:53 pm

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 176 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">
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Sales Order Import Error

Postby SBarnes » Tue Jan 20, 2015 5:01 pm

Mike,
thanks for the quick response
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron