Discussions
SuiteScript: Create a note on a supplier record
I am trying to create a note on a supplier record via Suitescript 2.0.
else{
//Create note that user has declined to send supplier evaluation form
var note = record.create({type: record.Type.NOTE});
note.setValue({fieldId: 'title', value:'Supplier Evaluation Form'});
note.setValue({fieldId: 'notetype', value: 7});
//note.setValue({fieldId: 'direction', value: 1});
note.setValue({fieldId: 'note', value: 'User has declined to send this supplier a Supplier Evaluation form.'});
note.setValue({fieldId: 'record', value: currentRecord.id})
note.save();
dialog.alert({
title: 'Send Supplier Evaluation Form',
message: 'A note has been created under Communications, User Notes, stating that you were offered to send this supplier a Supplier Evaluation form, but you declined to do so.'