#scripting
I am having issues taking a script that was written to pass the Primary Vendor Lead Time On Exit from the Item Vendor panel in Item Maintenance to a UDF on the Main panel and recreating it to pass the Default Whse Bin On Exit from the Reorder panel to a UDF on the Main panel. I have chopped it down to just the very first part where it makes a connection to Item Maintenance to get the Item Code and Default Warehouse of the item in question, and I still get an 'Error 88 SY_CommonUI.pvc" and Type mismatch: 'oSession.AsObject'.
Does 'coItem' not work the same when inside the DREORDER panel than it does inside of DVENDORS, or am I way off the mark? Any guidance would be appreciated. Thank you!
If oSecurity.TaskType = "M" and oBusObj.SecurityAccess > 0 Then
'ResetVariables
sRetval = "" : sItemCode = "" : sDfltWhse = "" :
nRetval = 0 : sBinLocation = ""
Set coItem = oSession.AsObject(oScript.Evaluate("coItem"))
sRetval = coItem.GetValue("DefaultWarehouseCode$", sDfltWhse)
sRetval = coItem.GetValue("ItemCode$", sItemCode)
sMsg = sItemCode & sDfltWhse
r=oScript.DebugPrint(sMsg)
End If
------------------------------
Amber Prayfrock, Blytheco
------------------------------