Page 1 of 1

Populating debtor EDI address. Reading same.

PostPosted: Tue Sep 01, 2015 6:06 pm
by DannyC
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

Re: Populating debtor EDI address. Reading same.

PostPosted: Wed Sep 02, 2015 3:21 pm
by Mike.Sheen
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.

Re: Populating debtor EDI address. Reading same.

PostPosted: Wed Sep 02, 2015 9:24 pm
by DannyC
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

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

PostPosted: Tue Sep 15, 2015 7:33 pm
by Mike.Sheen
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.