Netsuite Restlet脚本用户注释链接

Netsuite Restlet脚本用户注释链接,netsuite,Netsuite,您好,我正在尝试查找一个将用户注释链接到Netsuite RESTlet脚本中现有supportcase记录的示例。我对javascript和netsuite还相当陌生,所以自己想弄明白这一点让我非常恼火 提前感谢。这里有一段代码,用于创建注释并附加到实体记录。这与您在支持案例记录中的需求类似。希望这有帮助 // new note var noteObj = { "note": decodeURIComponent( data[param] ),

您好,我正在尝试查找一个将用户注释链接到Netsuite RESTlet脚本中现有supportcase记录的示例。我对javascript和netsuite还相当陌生,所以自己想弄明白这一点让我非常恼火


提前感谢。

这里有一段代码,用于创建注释并附加到实体记录。这与您在支持案例记录中的需求类似。希望这有帮助

// new note
        var noteObj = {
                "note": decodeURIComponent( data[param] ),
                "title": decodeURIComponent( data[param+"_title"] )
        }
        // set the note entity to the lead
        var noteRecord = record.create({
            type: record.Type.NOTE
        }).setValue({
            fieldId: 'entity',
            value: recordId
        }).setValue({
            fieldId: 'note',
            value: decodeURIComponent( noteObj.note )
        }).setValue({
            fieldId: 'title',
            value: decodeURIComponent( noteObj.title )
        }).save({
            enableSourcing: false,
            ignoreMandatoryFields: true
        });

谢谢你的回复。以下是我使用SuiteScript 1.0编写的工作脚本:

function newNote(datain)
{
    // new note
    var record = nlapiCreateRecord('note');
    // set the note activity value to the case id
    record.setFieldValue('activity',datain.recordID);
    record.setFieldValue('note',datain.note );
    record.setFieldValue('direction',1 );
    record.setFieldValue('notetype',9 );
    record.setFieldValue('title',datain.title );
    var recordId = nlapiSubmitRecord(record);
    nlapiLogExecution('DEBUG','id='+recordId);
    var nlobj = nlapiLoadRecord('note',recordId);
    return nlobj;

}

你可以发布你已经开始的内容吗?如果有帮助的话,我有一个适合SuiteScript初学者的YouTube频道:谢谢Eric,我还没有为此启动脚本,我已经实现了用于创建案例、更新、搜索等的工作脚本,但是在网上找不到任何关于用户注释和案例链接的内容。我会查看你的频道,谢谢!太棒了,谢谢你……等我弄明白了,我会发回的。原来是“活动”字段将便条链接到案例。再次感谢!