Help please! :)
I have a customer that's requested a script to change an email address in the Cust Maint Paperless Office Delivery Options on the change of the Sales Person. The script seems to run correctly & the debug print after write looks like it updated the value, but it's not actually doing it. Any suggestions? WHAT AM I DOING WRONG! haha
Here's my test script:
sNewEmail=""""
'Get connection to AR_CustomerDocumentContacts
oPLobj = oSession.GetObject(""AR_CustomerDocumentContacts_bus"")
Set oPLobj = oSession.AsObject(oPLobj)
retVal = oPLObj.SetValue(""ARDivisionNo$"", ""01"")
retVal = oPLObj.SetValue(""CustomerNo$"", ""ABF"")
retVal = oPLobj.SetValue(""Document$"", ""S/O INVOICE"")
retVal = oPLobj.SetKey()
retVal = oPLObj.SetValue(""ToAdditionalEmailAddress$"", ""testing@test.com"")
retVal = oPLobj.Write()
retVal = oPLObj.GetValue(""ToAdditionalEmailAddress$"", sNewEmail)
dbg=oscript.debugprint(""New Email: "" & sNewEmail)