var record = nlapiCreateRecord('task'); record.setFieldValue('title', taskTitle); var id = nlapiSubmitRecord(record, true);