Close Multiple Sales Orders

SOLVED

Hello, does anyone know of a way to automate closing multiple sales orders?

I was trying to look at API or Import options but seems that closing a sales order requires execution of an action (TRTCLESOH) and I'm not finding the easiest way to access the action. Any help would be appreciated!

Parents
  • +1
    verified answer

    You can use DIVSOHCLE to close multiple orders for whatever your parameter is, such as a range of order numbers, a certain customer, orders witch a specific backordered item, etc.

    The simple call is 

    Call DIVSOHCLE('order number here',1) From TRTVENCDE.

    You can stick this in a for loop or even use a pattern match inside the part where the order number goes, although I've never tried that. Of you can provide some more context about how the orders are linked I can write some script here for you that might do the trick.

  • 0 in reply to Zoey Mattison

    That worked perfectly, out of curiosity, is there any documentation on the TRTVENCDE script anywhere to know what options are available. 

    what does the second parameter (1) do?

    and is there any way to set the closing reason?

Reply Children