- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Get Product Line for Item on Sales Order
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-27-2011 11:07 AM
So I am currently looping through the Line Items on a sales order when the sales order is saved, but I can't seem to figure out how to grab the Product Line for the Line Item.
itemCode = ""
itemCodeDesc = ""
Set oLines = oBusObj.AsObject(oBusObj.Lines)
oLines.MoveFirst
While Not(cBool(oLines.EOF))
rtnVal = oLines.GetValue("ItemCode$", itemCode)
rtnVal = oLines.GetValue("ItemCodeDesc$", itemCodeDesc)
oLines.MoveNext
Wend
Solved! Go to Solution.
Re: Get Product Line for Item on Sales Order
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-27-2011 11:17 AM - last edited on 12-27-2011 11:17 AM
This would be put before your MoveNext.
prodLine = ""
set oItem = oLines.AsObject( oLines.GetChildHandle("ItemCode"))
oItem.Find(itemCode)
oItem.GetValue("ProductLine$",prodLine
Re: Get Product Line for Item on Sales Order
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-27-2011 11:22 AM
Here is a more complete code:
itemCode = ""
itemCodeDesc = ""
itemType = ""
prodLine = ""
oLines = 0
oItem = 0
Set oLines = oBusObj.AsObject(oBusObj.Lines)
Set oItem = oLines.AsObject(oLines.GetChildHandle("ItemCode"))
oLines.MoveFirst
While Not(cBool(oLines.EOF))
rtnVal = oLines.GetValue("ItemCode$", itemCode)
rtnVal = oLines.GetValue("ItemCodeDesc$", itemCodeDesc)
rtnVal = oLines.GetValue("ItemType$",itemType)
if itemType = "1" then
rtnVal = oItem.Find(itemCode)
rtnVal = oItem.GetValue("ProductLine$",prodLine)
end if
oLines.MoveNext
Wend


