Sunday, May 5, 2019

Create User Note on Existing Record via SuiteScript

The User Notes sublist holds static data and cannot be manipulated via the available Sublist APIs. It is however possible to create a user note and attach it to an existing record by SuiteScript.

This can be accomplished by using the following steps:

  1. Create a new record of type note:
    var rec = nlapiCreateRecord('note');
  2. Set at least the following values:
    • recordtype : internal id of the type of record,
    • record : internal id of the record to which the note will be attached,
    • note : the value which the Memo field will contain.
      rec.setFieldValue('transaction',123);
      rec.setFieldValue('note','This is a note');



  3. Submit the created record:
    nlapiSubmitRecord(rec);

No comments:

Post a Comment