SalesQuote XML Import CustomFields SettingID spaces  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

SalesQuote XML Import CustomFields SettingID spaces

Postby pricerc » Mon Apr 15, 2019 9:24 pm

This had me a bit puzzled.

Writing a transform to convert XML files designed for Jiwa6 into Jiwa7 format.

I wasn't expecting the trailing spaces in CustomField/SettingID to be significant, but it seems they are; I needed to pad them out to 36 characters to be recognised.

The clue was in one that I had exported that had them in.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: SalesQuote XML Import CustomFields SettingID spaces  Topic is solved

Postby Mike.Sheen » Tue Apr 16, 2019 10:28 am

Yes - I can see for example when the Inventory Maintenance deserialises the legacy XML it tries to locate the custom field using the item index untrimmed:

Code: Select all
Dim customField As JiwaApplication.CustomFields.CustomField = CustomFields(xmlCustomField.SettingID)


If we trim that SettingID it'd be able to locate the SettingID and go on to deserialise the value correctly.

Logged DEV-7428 to look into this.
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: SalesQuote XML Import CustomFields SettingID spaces

Postby pricerc » Tue Jul 09, 2019 10:40 am

Thought I should report that this problem appears to exist in

Code: Select all
SalesOrder.CustomFieldValues.ItemFromSettingID("52C6823F25454A2FAC3E")


So if your deserializer is using that method, it would account for the problem.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron