如何通过脚本访问和编辑客户单价

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

下午好, 我需要知道如何访问客户记录之外的单价字段,该字段位于客户 --> 财务子选项卡 --> 和子列表项目定价中。 我需要通过脚本编辑此值,但现在我不知道如何访问此字段以及在何处/何时生成此值,因为该值在项目中不存在。 谢谢你的时间! enter image description here

我正在搜索这个值是如何生成的,在记录浏览器中我找到了有关单价的信息,但在项目记录中找不到 enter image description here

netsuite suitescript suitescript2.0 suitescript1.0 netsuite-rest-api
1个回答
0
投票

ItemPricing 它是客户记录中的子列表,您可以使用它循环

   var customer = record.load({
            type: record.Type.CUSTOMER, 
            id: user.internalid,
            isDynamic: true
        });


for ( var j = 0; j < customer.getLineCount( 'itempricing'); j++ ) {

    var  infoField=customer.getSublistValue( 'itempricing', 'FIELD YOU ARE LOOKING FOR', j ) 

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