Close the Work Orders

If the user needs to close the work orders using the script, use the following function,

 let completionRecord = record.transform({
            fromType: record.Type.WORK_ORDER,
            fromId: workorderID,
            toType: record.Type.WORK_ORDER_CLOSE,
            isDynamic: true,
          }).save();

Leave a comment

Your email address will not be published. Required fields are marked *