How to update a custom record

if we want to save more than one value we can use setFeiledValue and if we want save single field we can use submit field method.
for example
more than one field

var record =nlapiLoadRecord('customrecord_jj_notification', 72)

console.log("result",record)
record.setFieldValue('custrecord_jj_message_subject', 'Test 25');
record.setFieldValue('custrecord_jj_message', 'First');
var id = nlapiSubmitRecord(record, true);

single field (with one step)

nlapiSubmitField('customrecord_jj_notification',50,'custrecord_jj_message_subject','second');

Leave a comment

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