OE COPY ORDERS MACRO FAILS

SUGGESTED

i recorded a macro to copy orders but it does not run , I get automation error.  the 'actions' don't work

same problem on different version of Sage 30

Anybody know why

OEORD2header.Init
OEORDC1Fields("FRCUST").Value = "1100"                                ' From Customer Number
OEORD2header.Init
OEORDC1Fields("TOCUST").Value = "1100"                                ' To Customer Number
OEORD2header.Init
OEORDC1Fields("FRORDER").Value = "ORD000000000007"                    ' From Order Number
OEORD2header.Init
OEORDC1Fields("TOORDER").Value = "ORD000000000007"                    ' To Order Number
OEORD2header.Init
OEORDC1Fields("ACTION").Value = "1"                                   ' Action Performed
OEORDC1.Process
OEORD2headerFields("PROCESSCMD").PutWithoutVerification ("1")         ' Process OIP Command
OEORD2header.Process
OEORD2detail1Fields("LINENUM").PutWithoutVerification ("-1")          ' Line Number

OEORD2detail1Fields("LINENUM").PutWithoutVerification ("-1")          ' Line Number

OEORD2detail1.Read
OEORDC1Fields("ACTION").Value = "3"                                   ' Action Performed
OEORDC1.Process

Parents
  • 0

    Hi Ron

    This doesn't address your specific issue here, however may be another way to get to the same end. I have a suite of solutions that assist with issues such as this through the use of VBA macros to format data into more usable forms for analysis, ingestion to other systems etc etc. If you get to that point, feel free to reach out. It would help me too as I build out my fleet of solutions. Good luck with it.

    Regards, Mark

Reply
  • 0

    Hi Ron

    This doesn't address your specific issue here, however may be another way to get to the same end. I have a suite of solutions that assist with issues such as this through the use of VBA macros to format data into more usable forms for analysis, ingestion to other systems etc etc. If you get to that point, feel free to reach out. It would help me too as I build out my fleet of solutions. Good luck with it.

    Regards, Mark

Children