How to get Child or sub file (table) level data from Sage VB Script

SUGGESTED

Hi All,

  I need to display a message box on Shipping Data Entry interface.  I can get data from "SO Sales Order Header"  and "SO Shipping Data Entry" and "Customer....".

On Custom Office using trigger of ""SO Shipping Data Entry"" and Pre-Write.

But, I could NOT get MEMO data from "SO Sales Order Memo" using the same logic code.  Please help!  Thank you all.

retVal = 0
oCust = 0
memo_code = ""

SET oCust = oBusObj.AsObject(oBusObj.GetChildHandle("SalesOrderNo"))

retVal = oCust.GetValue("MemoCode$", memo_code )
retVal = oScript.SetError("MEMOCODE string - is not blank! " & memo_code )

' set oCust = oSession.AsObject(oBusObj.GetChildHandle("SalesOrderNo"))  --- tested
' Set oCust = oSession.AsObject(oBusObj.GetChildHandle(“CustomerNo”)) --- sample

Parents
  • 0

    For the memo info, you are likely either going to have to query the memo info through ODBC within your script or get a handle to SO_SalesOrderMemo_Bus and either set each key value, set a browse filter, or use GetResultSets to get the data you want as sales order entey does not create a child object for the memo table like it does for the customer number and salesperson number.

Reply
  • 0

    For the memo info, you are likely either going to have to query the memo info through ODBC within your script or get a handle to SO_SalesOrderMemo_Bus and either set each key value, set a browse filter, or use GetResultSets to get the data you want as sales order entey does not create a child object for the memo table like it does for the customer number and salesperson number.

Children