Hi Forum,
I am importing SO Invoices with a BOI script, imports fine but i cannot get the Sales Order Number to update.
I have 2 scripts, one to import invoices (I cannot set the SO # here, no error just no SO value in the Invoice Header).
the second script imports the Tracking numbers and also works fine except, if I try to update the SO # here i get an error message the i need to set the Batch number and here is the problem.
How can I get the batch number, i know that GL_CompanyActiveBatch table has the Batch numbers but unfortunately there are other users entering invoices manually and there are a few SO Invoice Entry batches.
Here is the code that i am using on the second script:
r = oInv.nSetKeyValue("InvoiceNo$", sInvoice_Num)
r = oInv.nSetKey()
if r = 0 then
MsgBox(oInv.sLastErrorMsg & sInvoice_Num & vbCRLF & "Inv Header Failed")
end if
r = oInv.nSetValue("SalesOrderNo$", strOrderNo)
r = oInv.nWrite()
*** this are the error messages ***
Why i cannot update the sales order when i am importing the Invoices. I am Importing the order from a text file with all the lines with invoice and SO numbers.
This is the code i use in the invoice import script:
retHdrKey = o.nClear()
msgbox "Last Order: " & sOrdNum
r = oInv.nSetValue("SalesOrderNo$", sOrdNum)
r = oInv.nWrite()
I think i asked this same question time ago but i couldn't find any notes about it.
Regards,
Manuel Roman