I have a script that errors out on an intermittent basis. I was wondering if anyone has any ideas on why. I can go days without getting an error message, then once I get the error I have to exit out of sales order entry. Once I return to SO entry I no longer get the error when I select the button.
Running Sage 100 2014
Advanced
Multiple locations using Sage 100 SO Data Entry
Error message:
Error 438
Object doesn’t support this property or method: “oUI.Process”
In Sales Order Entry
On the lines tab
Select an inventory item
Select the Link button – this launches the script – the script will launch item inquiry for the item selected - this button is selected on almost every order.
Dim sItemCode
sItemCode = ""
If Not(IsObject(oLines)) Then
Set oLines = oBusObj.AsObject(oBusObj.Lines)
End If
retVal = oLines.GetValue("ItemCode$",sItemCode)
If Not(IsObject(oUI)) Then
Set oUI = oSession.AsObject(oSession.GetObject("IM_ItemInquiry_ui"))
End If
'retVal = oSession.InvokeProgram("IM_ITEM_UI", sItemCode)
retVal = oUI.Process(sItemCode)
Thank you for your time.