- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Invoke Sales Order Copy From
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-25-2012 06:52 AM
Is there a way to programmatically invoke the Sales Order Copy From functionality so that I can essentially pass in an existing sales order to a copy from method and get returned a new sales order number?
Solved! Go to Solution.
Re: Invoke Sales Order Copy From
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-25-2012 10:15 AM
SO_SalesOrder_bus has a CopyFromOrder method. It doesn't assign a new sales order number. You need to set a new order number, copy another order, then write the new order.
CopyFromOrder(order$, type$, clearJob, copyMemos)
order$ = the order to copy
type$ = the new order type (eg. "S" for standard)
clearJob = to clear job information on the order or not
copyMemos = to copy order memo or not
Sr. Software Engineer
Sage 100 ERP
Re: Invoke Sales Order Copy From
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-26-2012 12:43 PM
I get that the object doesn't support this property or method. I am guessing I am not doing something quite right:
Set order = oScript.NewObject("SO_SalesOrder_bus", oSS)
With order
strNewOrderNo = ""
.nGetNextSalesOrderNo strNewOrderNo
.nSetKey strNewOrderNo
.CopyFromOrder strOrderNo, orderType, false, true
.nWrite
End With
Re: Invoke Sales Order Copy From
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-26-2012 12:48 PM
.CopyFromOrder
missing the 'n'
You can also use order.sLastErrorMsg to see if the commands are succeeding or not.
Re: Invoke Sales Order Copy From
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-26-2012 12:52 PM
Hi dosborn,
You'll have to either replace orderType with "S" or some other value. Also, it should be nCopyFromOrder
Elliott
Re: Invoke Sales Order Copy From
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-26-2012 01:57 PM
Thanks, can't believe I didn't notice that.


