I'm attempting to update the Due Date on the AR_OpenInvoice table from the invoice history inquiry screen. It acts like its writing but it doesn't. What I'm missing. 'THIS DOESN'T WORK Dim Mas_Scr_Dbg ' debug is turned off - set to 1 to enable: Mas_Scr_Dbg = 1 Dim InvNo Dim InvType Dim DueDate DueDate = "" InvNo = "" InvType = "" Div = "" Cust = "" retval =oBusObj.GetValue("ARDivisionNo$",Div) retval =oBusObj.GetValue("CustomerNo$",Cust) retval =oBusObj.GetValue("InvoiceNo$",InvNo) retval =oBusObj.GetValue("InvoiceType$",InvType) '**** AR Invoice Header******* oARInvoice = oSession.GetObject("AR_OpenInvoice_bus") if oARInvoice 0 then Set oARInvoice= oSession.AsObject(oARInvoice) else retval = oSession.AsObject(oSession.UI).Messagebox( "","oARInvoice failed") return end if retval = oSession.AsObject(oSession.UI).Messagebox( "","Opened oARInvoice " ) Test = InvNo & InvType retval = oARInvoice.SetKeyValue("ARDivisionNo$",Div) retval = oARInvoice.SetKeyValue("CustomerNo$",Cust) retval = oARInvoice.SetKeyValue("InvoiceNo$",InvNo) retval = oARInvoice.SetKeyValue("InvoiceType$",InvType) retVal = oARInvoice.SetKey() msgbox "Inv=" & InvNo & " type=" & InvType if retVal = 1 then retVal = oARInvoice.GetValue("InvoiceDueDate$",DueDate) msgbox "Due Date " & DueDate DueDate = "20151231" retVal = oARInvoice.SetValue("InvoiceDueDate$",DueDate) retval = oARInvoice.write 'THIS DOESN'T WORK msgbox "Due Date " & DueDate else msgbox "No Find" end if retval = oSession.DropObject("AR_OpenInvoice_bus")
↧