I suggest just calling stored procedure 'ADG_SOEvent_Create' to create a log entry. It takes the following parameters:
@cpnyid varchar(10),
@descr varchar(30),
@eventtype varchar(4),
@ordnbr varchar(15),
@progid varchar(8),
@shipperid varchar(15),
@userid varchar(10)
@shipperid is specified when the entry pertains to a shipper, otherwise it is left blank.
The SOEvent table does use an identity field for EventID (for version 7 anyway), so you should be able to insert without specifying a value. Or use the above procedure whose text shows how it is done.
Valid values for eventtype:
-
- X - None
- ENT - Enter Order
- MORD - Modify Order
- DET - Approve Order Details
- TECH - Technical Approval
- COST - Cost/Price Approval
- REL - Release Order
- PRC - Print Order Confirmation
- PRQ - Print Quote
- GPO - Generate POs Needed
- AAI - Auto Advance to Invoice
- RMA - Create RMA Receiver
- CRTS - Create Shipper
- ENTS - Enter Shipper
- MSHP - Modify Shipper
- PPIK - Print Picking List
- CPIK - Confirm Picking
- NPIK - Print Picking Notice
- RASY - Release for Assembly
- PASY - Print Workorder
- CASY - Confirm Assembly
- NASY - Print Assembly Notice
- RINS - Release for Inspection
- PINS - Print Inspection Order
- CINS - Confirm Inspection
- NINS - Print Inspection Notice
- RPAK - Release for Packing
- PPAK - Print Packing Slip
- CPAK - Confirm Packing
- NPAK - Print Packing Notice
- RSHP - Release for Shipping
- PSHP - Print Bill of Lading
- SLAB - Print Shipping Label
- MAN - Manifest Shipment
- CSHP - Confirm Shipment
- NSHP - Print Advance Ship Notice
- RUPD - Release for Update
- USHP - Update Shipper
- PINV - Print Invoice
- AHLD - Administrative Hold
- AREL - Release Administrative Hold
- CHLD - Credit Hold
- CREL - Release Credit Hold
- CANO - Cancel Order
- CANA - Cancel Order (Automatic)
- CANS - Cancel Shipper
- CAND - Cancel Schedules (Cancel Date)
- CLOR - Close Order
- CLSH - Close Shipper
- MREL - Manual Release
- RREC - Release For Receipt
- PREC - Print Receiver
- CREC - Confirm Receipt
- 0 - User Event 0
- 1 - User Event 1
- 2 - User Event 2
- 3 - User Event 3
- 4 - User Event 4
- 5 - User Event 5
- 6 - User Event 6
- 7 - User Event 7
- 8 - User Event 8
- 9 - User Event 9