I'm working Sutiescript example of add a bill address and ship address to the record when transform the sales order to invoice.
my code doesn't work:
var transformRecord = record.transform({
fromType: record.Type.SALES_ORDER,
fromId: salesOrder.id,
toType: record.Type.INVOICE,
isDynamic: false
});
transformRecord.setValue({fieldId: "billAddress",value: "address sample"});
transformRecord.setValue({fieldId: "billingAddress_text",value: "address sample"});