Hi all,
I have a very simple script that prevents users from getting into a sales order if the Picking Sheet has been printed, but it also prevents the sales order from fully completing and getting removed from Sales Order Entry when it is shipped. Any ideas how I can allow this to work only when the UI is used and not any other time?
SOPickEdit = 0
SOPickEdit = oSession.AsObject(oSession.Security).IsMember(""SOPICKEDIT"")
if SOPickEdit > 0 then
exit sub
end if
sSalesOrder = """" : sPickPrinted = """"
retVal = oBusObj.GetValue(""SalesOrderNo$"", sSalesOrder)
retVal = oBusObj.GetValue(""PickingSheetPrinted$"", sPickPrinted)
if sPickPrinted = ""Y"" then
sMsg = ""Picking Sheet has been printed. Use Sales Order Inquiry to view SO "" & sSalesOrder & "".""
retVal = oBusObj.SetToReadOnly(sMsg)
end if