Plus Community - for users of ACCPAC & Adagio accounting software

Welcome to the PlusCommunity forums! PlusCommunity is a gathering place for companies running Simply Accounting, ACCPAC Plus, Sage Accpac ERP (ACCPAC Advantage/ACCPAC for Windows), and Adagio Accounting.
New visitors, please click here!

Page 1 of 1 1
Topic Options
#53172 - 08/17/17 11:11 AM OE Macro Creates an Order - Return Order Number
S.Herlick
Member


Registered: 11/21/03
Posts: 56
Loc: Canada
Hi All;

I have a OE Order Entry macro written that successfully creates an OE order. I write out a log file as the macro progress to capture any errors and report back on them. I would like to add the OE Order number created when successful to the log file. Can someone tell me the command to use to find the OE Order Number after the order is created.

Thanks

Stephen

Top
#53173 - 08/17/17 11:12 AM Re: OE Macro Creates an Order - Return Order Number [Re: S.Herlick]
Jay Converse Administrator
Member


Registered: 07/31/00
Posts: 7555
Loc: Location, Location
OEORDH.ORDNUMBER
_________________________
Jay Converse
Sage 300 Whisperer

Top
#53174 - 08/17/17 11:52 AM Re: OE Macro Creates an Order - Return Order Number [Re: S.Herlick]
S.Herlick
Member


Registered: 11/21/03
Posts: 56
Loc: Canada
Figured it out.
I did this:

OEORD1header.Process
OEORD1header.Insert
If OEORD1header.LastReturnCode = 0 Then
newOrderNumber = OEORD1header.Fields("ORDNUMBER").Value
Else
' Error handling
End if

Top
#53175 - 08/17/17 11:53 AM Re: OE Macro Creates an Order - Return Order Number [Re: S.Herlick]
S.Herlick
Member


Registered: 11/21/03
Posts: 56
Loc: Canada
Thanks for the quick response.
Top
Page 1 of 1 1


Moderator:  Jay Converse 
Hop to: