If sometimes happens that a user manually creates a sales order for an EDI customer and forgets to set the
Later they notice that they can’t send any DESADV or INVOICE and ask support.
We assume that
C_Invoicehave the same
Let the order’s
POReference be ‘123456’
How to fix:
UPDATE C_Order SET IsEDIEnAbled='Y', Updated=now(), Updatedby=99 WHERE POReference='123456'; UPDATE M_InOut SET IsEDIEnAbled='Y', Updated=now(), Updatedby=99 WHERE POReference='123456'; UPDATE C_Invoice SET IsEDIEnAbled='Y', EDI_ExportStatus='P', Updated=now(), Updatedby=99 WHERE POReference='123456';
At this point, the invoice can already be send as EDI-INVOIC.
For the DESADV, we need to create the EDI_Desadv record. To do that, we can now use a dedicated process (
AD_Process.Value='EDI_Desadv_Create_From_C_Order') from the sales order’s gear.
That process is available if the current sales order is complered or closed, has
IsEdiEnabled=Y and does not yet reference an
EDI_Desadvrecords, if another order needs to be added. In this case, the DESADV record is updated.
M_InOutsto the currently processed order’s
EDI_Desadvrecord if they reference that order, have the same
POReference, are completed or closed, have
IsEdiEnabled=Yand don’t reference an