I successfuly tested the following (slightly modified) version of your script on both Main and Header panels. If you don't have oSession, then you likely haven't set the script to run on the server. Be sure to use the standard oBusObj to reuse the provided business object for the sales order header and initialize your strTemp variable. strTemp = "" Set oLines = oBusObj.AsObject(oBusObj.Lines) retVal = oLines.MoveFirst() Do While Not(cBool(oLines.EOF)) retVal = oLines.GetValue("ItemCode$", strTemp) retVal = oSession.AsObject(oSession.UI).MessageBox(strTemp) retVal = oLines.MoveNext() Loop
↧