Populating debtor EDI address. Reading same.  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Populating debtor EDI address. Reading same.

Postby DannyC » Tue Sep 01, 2015 6:06 pm

Hi,

Via the Jiwa GUI, how is the debtor EDI address populated? The field doesn't allow direct entry, it is only selectable via a dropdown but I can't locate any configuration anywhere which allows population of it.
I know the data should live in the DB_EDIMain table, just can't find the screen in Jiwa to populate it.

Once populated, I can't find a way to read the EDI address from the sales order.
I have a plugin but the
Code: Select all
SalesOrder.Debtor

object doesn't seem to have a property to read that information. I also tried creating a new debtor entity but it isn't in there either.

Thanks

Danny
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Populating debtor EDI address. Reading same.

Postby Mike.Sheen » Wed Sep 02, 2015 3:21 pm

The inability to set the EDI Address on the Debtor Maintenance form looks like a bug, I'm not sure why it's a lookup field - I would have thought that should be a simple text field. Logged as bug 12023

Via the sales order object, the EDI information is accessed via the EDI property of the sales order.

E.G.:
Code: Select all
SalesOrder.EDI.EDIAddress


Whilst you're delving into EDI, take note there is a method to resolve a debtor ID from an EDI Address:

Code: Select all
Dim debtorID as string
SalesOrder.GetDebtorIDFromEDIAddress("883836y4642", debtorID)


Also note that when deserialising a sales order from XML string or the poco, if the "SenderEDIAddress" is provided in the header, then you don't need to supply the debtor information, the sales order business logic will use the above GetDebtorIDFromEDIAddress method to work out the debtor.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Populating debtor EDI address. Reading same.

Postby DannyC » Wed Sep 02, 2015 9:24 pm

Thanks Mike.
It seems the SalesOrder.EDI returns the data within the sales order EDI tab, as expected.
Unfortunately that is not what I'm after.
I need the debtor EDI code from Debtor Maintenance, EDI tab.

When a new sales order is created that value is not copied to the sales order.

In 6.5.13 I used to do a SQL SELECT statement to look it up directly from the database - that may be my better option for now if not possible via the objects.

Cheers

Danny
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Populating debtor EDI address. Reading same.  Topic is solved

Postby Mike.Sheen » Tue Sep 15, 2015 7:33 pm

DannyC wrote:Thanks Mike.
It seems the SalesOrder.EDI returns the data within the sales order EDI tab, as expected.
Unfortunately that is not what I'm after.
I need the debtor EDI code from Debtor Maintenance, EDI tab.

When a new sales order is created that value is not copied to the sales order.

In 6.5.13 I used to do a SQL SELECT statement to look it up directly from the database - that may be my better option for now if not possible via the objects.

Cheers

Danny


The most efficient way would be to just do a single query - the debtor business logic could also be used - just do the read of a debtor given the debtor id.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests