保存记录功能不在记录级客户端脚本中执行

Save Record function does not execute in Record Level Client Script

我正在尝试执行一个简单的函数,在保存员工记录时记录记录类型。

function saveRecordRec(){
    var stType = nlapiGetRecordType();
    nlapiLogExecution('DEBUG', 'Record type of current record', stType);
    return true;
}

我有一个未在此处列出的 pageInit 函数,运行 在同一脚本文件中。此函数是预期的 运行,所以我确定我已将正确的脚本加载到 Netsuite 中。我也检查过,即使在我对员工记录执行了其余脚本后,它仍然显示 I have the Scripts form filled in correctly. However, nothing displays in my Execution Log。

这是因为客户端脚本 运行 在浏览器中,除非 运行 在 Web 上下文中作为 "Scriptable Cart and Checkout" 脚本。

我等了很长时间(大约一个小时),终于记录了一条日志。我没有更改 Netsuite 或我的脚本中的任何内容。我只需要等待。 Here is the intended result.

它应该是一个多小时前记录的,直到今天 11:18am 才显示。