Suitescript code to set invoice as default values when it is applied to credit memo

let objRecord = record.transform({
    fromType: record.Type.INVOICE,
    fromId: "123",//invoice internal id
    toType: record.Type.CREDIT_MEMO,
    isDynamic: true,
    defaultValues: { invoices: "123" }//invoice internal id
});
objRecord.save();

Leave a comment

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