如何在 save search netsuite 中采用基于数量的定价
How to take quantity based pricing in save search netsuite
我必须创建一个保存搜索并获取基于数量的项目定价。怎么做。为了获取单价,我使用以下公式。
DECODE({inventorylocation},'WH29',{locationquantityavailable})
AFAIK 数量定价在搜索中不可用 joins/columns。您也可以加载记录并获取数量定价。
加载记录后,您可以矩阵字段 API 获取定价信息。
请注意,定价矩阵 ID 会根据是否启用多价和多币种功能而有所不同。
[更新]
有这个 pricing
连接,没有记录。
在搜索 UI 中,它有一些有用的字段,例如:currency
、minimuquantity
和 maximumquantity
。
从脚本中我可以获得附加字段的值,例如:
unitprice
、pricelevel
和 quantityrange
当您在 NetSuite 中打开多重定价 and/or 数量定价功能时,会有一个额外的记录加入到名为定价 ({pricing}) 的项目记录中。
这个新的定价连接有 {quantityrange}、{maximumquantity} 和 {minimumquantity}。您可以使用这些字段添加到项目记录的查询中,或者您可以使用字段 {item} 直接从定价记录转到项目记录。
添加示例:
var itemIds = [...]; // for some set of items
var itemPrices = nlapiSearchRecord('item', null,
[
new nlobjSearchFilter('internalid', null, 'anyof', itemIds),
new nlobjSearchFilter('currency', 'pricing', 'is', '1'), // use this line if you have multiple currencies. normally 1 is USD but this varies by account.
new nlobjSearchFilter('pricelevel', 'pricing', 'is', '5'), // default online price level id. You can use any id.
// new nlobjSearchFilter('customer', 'pricing', 'is', customerId) // if you are getting the prices for a particular customer
],[
new nlobjSearchColumn('unitprice', 'pricing'),
new nlobjSearchColumn('quantityrange', 'pricing')
]);
注:
您可能想限制您的项目列表,因为即使是这个例子也会 return 行数是项目数 * 价格区间数。如果没有货币和价格水平过滤器,您可以快速用完默认搜索结果限制(商品数量 * 价格水平数量 * 货币数量 * 价格突破数量),最终不得不对 return 使用较慢的策略正在查看信息。
我必须创建一个保存搜索并获取基于数量的项目定价。怎么做。为了获取单价,我使用以下公式。
DECODE({inventorylocation},'WH29',{locationquantityavailable})
AFAIK 数量定价在搜索中不可用 joins/columns。您也可以加载记录并获取数量定价。
加载记录后,您可以矩阵字段 API 获取定价信息。
请注意,定价矩阵 ID 会根据是否启用多价和多币种功能而有所不同。
[更新]
有这个 pricing
连接,没有记录。
在搜索 UI 中,它有一些有用的字段,例如:currency
、minimuquantity
和 maximumquantity
。
从脚本中我可以获得附加字段的值,例如:
unitprice
、pricelevel
和 quantityrange
当您在 NetSuite 中打开多重定价 and/or 数量定价功能时,会有一个额外的记录加入到名为定价 ({pricing}) 的项目记录中。
这个新的定价连接有 {quantityrange}、{maximumquantity} 和 {minimumquantity}。您可以使用这些字段添加到项目记录的查询中,或者您可以使用字段 {item} 直接从定价记录转到项目记录。
添加示例:
var itemIds = [...]; // for some set of items
var itemPrices = nlapiSearchRecord('item', null,
[
new nlobjSearchFilter('internalid', null, 'anyof', itemIds),
new nlobjSearchFilter('currency', 'pricing', 'is', '1'), // use this line if you have multiple currencies. normally 1 is USD but this varies by account.
new nlobjSearchFilter('pricelevel', 'pricing', 'is', '5'), // default online price level id. You can use any id.
// new nlobjSearchFilter('customer', 'pricing', 'is', customerId) // if you are getting the prices for a particular customer
],[
new nlobjSearchColumn('unitprice', 'pricing'),
new nlobjSearchColumn('quantityrange', 'pricing')
]);
注:
您可能想限制您的项目列表,因为即使是这个例子也会 return 行数是项目数 * 价格区间数。如果没有货币和价格水平过滤器,您可以快速用完默认搜索结果限制(商品数量 * 价格水平数量 * 货币数量 * 价格突破数量),最终不得不对 return 使用较慢的策略正在查看信息。