Create opportunity record using make a copy option by suitescript

To make a copy of a record using suitescript, use the following code.

let objRecord = record.copy({                           

type: ‘opportunity’,                           

id: ‘internal id of the record’,                           

isDynamic: true,

}

// Set the multiselect field value to the selected value                       

objRecord.setValue({                           

fieldId: ‘fieldId’                           

value: Value                       

});                       

objRecord.setValue({                           

fieldId: ‘fieldID’,                         

  value: ‘value’                     

  });

    // Save the new record
    objRecord.save();

Leave a comment

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