How to take quantity based pricing in save search netsuite

为君一笑 提交于 2019-12-01 09:53:32

问题


I have to create a save search and fetch pricing of items which is quantity based. How to do that. For fetching unit price, I use the following formula.

DECODE({inventorylocation},'WH29',{locationquantityavailable})

回答1:


AFAIK quantity pricing is not available in search joins/columns. You may alternatively load the record and get quantity pricing.

You can matrix field APIs to get pricing information after you load the record.

Note, that the pricing matrix id varies depending on whether multiprice and multicurrency features are enabled.

[Update]

There is this pricing join, which is not documented.

In the Search UI it has useful fields like: currency, minimuquantity and maximumquantity.

From the script I could get value for additonal fields like: unitprice, pricelevel and quantityrange




回答2:


To add an example:

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')
]);

Note:

You probably want to limit your list of items because even this example will return a row count that is the # of items * # of price breaks. Without the currency and price level filters you can quickly use up the default search result limit (# of items * # of price levels * # of currencies * # of price breaks) and end up having to use slower strategies for returning the information.




回答3:


When you turn on Multiple Prices and/or Quantity Pricing feature in NetSuite, there is an additional record joined to the item record called Pricing ({pricing}).

This new pricing join has {quantityrange}, {maximumquantity}, and {minimumquantity}. You can use these fields to add to your query of the item record, or you can go direct from the Pricing record which has a join to the item recording using field {item}.



来源:https://stackoverflow.com/questions/39869486/how-to-take-quantity-based-pricing-in-save-search-netsuite

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!