Netsuite - 能够更新插入/更新发票行项目吗?

问题描述 投票:0回答:2

我需要能够使用来自外部系统的更新信息更新插入 NetSuite 发票中的行项目。

我正在 NetSuite 中使用有效负载创建发票:

{
"tranDate": "2021-07-12", 
"dueDate": "2021-07-19", 
"externalId": "sysA_INV-34698", 
"amountPaid": 0, 
"entity": {
    "id": 3127
},
"item": {
    "items": [ 
        {
            "item": { 
                "id": 374
            }, 
            "internalId": "sysA_INV-34698_JOBID-4875398"
            "quantity": 1, 
            "rate": 534.54
        }
    ]
}
}

我想使用internalId更新插入此行项目,但它似乎没有针对该行项目保存,因此我无法定位它。 NetSuite 中是否可以更新插入/更新行项目,或者我是否必须将它们全部删除并在每次源系统有新数据时重新创建它们?

api netsuite
2个回答
0
投票

要更新特定行项目,请使用

itme.items.line
字段。这将使您能够针对特定的行进行更新。


0
投票

使用 NetSuite REST API,您可以通过提交带有参数

PATCH
replaceSelectedFields=true
replace=item

请求来覆盖项目,而无需附加

因此您的请求网址可能如下所示

PATCH .../发票/{id}?replaceSelectedFields=true&replace=item

© www.soinside.com 2019 - 2024. All rights reserved.