I have a script that works in SO Order data entry and is displaying a check box if the customer has paperless office (SO Invoice) turned on for this customer. We not concerned with whom it is going to email, just that it is going to email (aka Paperless Office).
It all works on my v2019 Standard Version. On the client, it is mostly working. The box is getting check when appropriated.
If the UDF box is uncheck, the client is clicking on the customer hyperlink from SO Order data entry by going to Customer> Paperless> and updating the record. They are getting "the lock information was not found" message.
The last line of my script is oSession.DropObject("AR_CustomerDocuments_bus"), so I assumed that this was clearing the business objects. The only difference is I am running Standard and they are Advanced. Ideas?
I have tried _SVC instead of _bus and the same results.
I tried using Find(xxx) instead of the setkey(), but same locking message as well
Other part of script
'To Pull from AR Customer for Order
if StartProgram = "SO_SALESORDER_UI" then
SET oARCustomer = oSession.AsObject(oSession.NewObject("AR_CustomerDocuments_bus"))
retVal =oARCustomer.SetKeyValue("ARDivisionNo$",ARDivisionNo)
retVal = oARCustomer.SetKeyValue("CustomerNo$",CustomerNo)
retVal = oARCustomer.SetKeyValue("Document$","S/O Order")
retVal = oARCustomer.SetKey()
retVal =oARCustomer.GetValue("EmailDocument$",EmailDocument)
if EmailDocument = "Y" then
retval=oBusObj.Setvalue("UDF_EMAIL_DOCUMENT$","Y")
end if
'CleanUp
oSession.DropObject("AR_CustomerDocuments_bus")
#CustomOffice #Advanced #Scripting
------------------------------
Michael Davis
Warren Averett Technology Group
------------------------------