如何通过代码更改脚本的部署状态?网络套件 SuiteScript 2.0

How can I change the deployed status of a script through code? Netsuite SuiteScript 2.0

有人可以解释一下如何通过代码更改任何脚本的部署状态吗?感谢帮助。谢谢。

您可以使用 N/record 模块的 submitFields 方法。

record.submitFields({
    type: record.Type.SCRIPT_DEPLOYMENT,
    id: scriptDeploymentId,
    values: {
        status: 'RELEASED' // or 'TESTING'
    }
});