i have about 500 transfer orders that we need to c...
# suitescript
s
i have about 500 transfer orders that we need to close, we are using a map/reduce script setting the status didnt seem to work what is the next best option
Copy code
record.submitFields({
      type: record.Type.TRANSFER_ORDER,
      id: data.id,
      values: {
        // postingperiod: "157",
        status: "Closed",
      },
      options: {
        enableSourcing: false,
        ignoreMandatoryFields: true,
      },
    });
a
you may need to load each record, loop through the lines and check the
closed
box for each
s
the closed line or main ?
m
Yep. You'll want to set
isclosed
to
true
for each line item on the transaction. When they're all closed, the transaction itself should change status to closed.
💯 3
t
I think you can do this by voiding a transaction, N/transaction module, this module supports transfer order.