Netsuite, Filtering the Items allowed to sell based on a customer classification - netsuite

I am wondering if it is possible in NetSuite to filter items available to sell based on a customer.
The requirement is that the company restricts selling certain items to some selected customers. Just wanted to know if this is possible in NetSuite.
I am aware that it is possible in sales order form to have an 'Item saved search' as the filtering criteria. But this does not allow filtering items based on selected customer fields. Seems 'Item saved search' that is assigned for the form can only use static fields or some variables from the 'Item work flow'.
Other way I tried is by restricting the 'Custom' price level on the sales order form. This way I am able stop selling anything not assigned to the customer price level. But I cannot stop those items being listed in the drop-down and search list.
Really appreciate any help on this.

You can use clientscript with validateLine function
Create script parameter with item list record type and select item which you want to restrict.
Within validateLine function restrict item which is selected within a script parameter record.

I was successful in filtering class based on a particular department and the following approach was followed:
var selectedCustom = 'T';
var v_form = type + '_form';
var formCustom = document.forms[v_form];
var fldCustom = getFormElement(formCustom, fldnamCustom.toLowerCase());
Using the above approach the following function was able to filter the list of values
addSelectOption(document, ldCustom, v_class, v_class_id, selectedCustom);

Related

How to add a column to the Sub record inventory detail?

How to add a column to the Sub record inventory detail?
just like expiration date on inventory number subrecord on Item Receipt, can we have a custom field for manufacturing date in inventory number subrecord. Is there any feature need to be enabled? Does NetSuite have any functionality of Production/Manufacturing date? or any way to create a custom field in inventory number subrecord that is visible in IR subrecord?
In Netsuite go to
Customization -> Lists, Records, Fields -> Item Number Fields
If you have a production run you either have lot numbered or serialized inventory. You can make the field applicable to all Lot Numbered or all Serialized or to just specific skus.
Note that the items need to have been created as lot numbered or serialized items. If the items you want to use were not created as such then you’ll need to replace them with new items. If you want to use the same skus for the new items you’ll need to rename the original items.

sorting list of items with specific field on sales order item sublist NetSuite

I like to sort the list of items in the dropdown in the standard NetSuite sublist item. Let's say items are sorted with the name when clicked on >> to open the dropdown list.
Is this possible to sort this list with any other fields, maybe a custom field on items record. let's say I add a custom field on the item record (every item), which is some numbers.
displaying that list with the order by that field.
I have seen a way around to create a custom sublist of my own requirement and then hide the standard and show the custom on a specific record by customizing the form.
I had a similar issue once, I did the following:
You can create a new body field or sublist field based on your business using userevent script(before load).
Create a search with the required order(you can do any operation to prepare your data) after that you filled the result manually to the new custom field.
Whenever the user selects a value in the custom field you set the original one to be the same as the custom one. For this one, you will need a client script.
Note: you can show your custom field and hide or disable the original field only not the whole list since the client script will be responsible to set the value to it. using this approach will not require you to add or edit any of your records which will be helpful if you have a complex process and a lot of dependencies. This approach worked for my issue I hope to be helpful to you too.

In Acumatica, using #me inside Relations Section of Generic Inquiry

We want to have a sales order dashboard where we only show orders for certain sales people based on the logged in user. For example, we have sales people BB and CR who share an assistant TP. BB can see his orders on the dashboard. CR can see his orders on the dashboard. TP can see orders for both of them on his dashboard. We also have people outside of sales who need to see all orders. We want to do all of this without having to create a bunch of custom dashboards. We wanted to maintain 2 dashboards - one filtered one for sales people and one unfiltered one for everyone else.
We have gotten close to solution by using a generic inquiry. We created custom fields on the salesperson that point back to a logged in user (UserID1 and UserID2). Multiple custom fields were used because a single sales person could be visible to 2 people. We then joined SOOrder to SalesPerson inside our GI. We then wanted to join the Users table on (SalesPerson.UserID1 = Users.PKID AND SalesPerson.UserID1 = #me) OR (SalesPerson.UserID2 = Users.PKID AND SalesPerson.UserID2 = #me). That would allow us to create a filter where Users.PKID is not null to limit the view for sales people and then not use any filter on the non-sales dashboard.
The problem is that #me is not available on the Relations section. It is only available on the conditions section. We tried to just have the join of SalesPerson.UserID1 = Users.PKID or SalesPerson.UserID2 = Users.PKID and then creating the condition for the #me portion. The issue there is that it only shows records with a match. That won't work for non-sales people.
Is there some way to include #me or an equivalent on the relations tab? Any better way to accomplish this?
Built-in variables like '#me' aren't well documented which raises questions about support of this feature.
Try this instead:
In generic inquiry TABLES tab, add table 'PX.Data.AccessInfo'.
In PARAMETERS tab, add a new parameter (ex: 'P1') and set the Schema Field value to 'Accessinfo.UserID' (use 'Accessinfo' or the alias for that table declared in TABLES tab).
In the RELATIONS tab in the join condition Child Field you can reference the '[P1]' variable.
Accessinfo DAC contains current record of the logged in user and reflects the information you see when you click your profile in the top right of Acumatica pages. If the solution doesn't work right away you can debug it with the Request Profiler page to look up the generated SQL query for the GI.

restlet item group cusstom price

I am trying to create an SO using restlet in Netsuite. The question that I have is when the item is an itemgroup, how do i pass the json so that the restlet can customize the price level etc for children elements of the group.
Currently if I pass the parrent, the child items automatically get passed in the SO that is created via restlet. Here unfortunately I can only control the Quantity and not price level.
Is there a way so that I can pass( from different endpoint) Json to the restlet so that It can create the SO with all the right pricing for ItemGroup?
Thanks in Advance.
I don't think you can do this. You can't change the price of an item for a specific sales order. The price will only change if you change the value of the Item record in NetSuite.
You could look at adding discounts on your Sales Order. If your prices on an order differ from the item price on NetSuite,you can add a discount item to the sales order.

Netsuite Handle Changed Items

I wrote SuiteScript attch it to event "submit after', Apply it to Customer and it works fine, when i create or edit customer. Now I want attach this script to Item, another words when new Item create or edit. What I need to choose from "Applies To" for that? (http://joxi.ru/uHTeUhjKTJCYBexbX8Y)
Short Answer
you have to select all the different item types individually (e.g. Serialized Inventory Item, Sales Tax Item etc)
Long Answer
Transaction and Items are not actual record types in Netsuite. Items is just an abstraction for the combination of different item types which is not available at every customization level. For a complete list of item types see
https://system.netsuite.com/app/common/item/item.nl
https://system.na1.netsuite.com/app/common/item/item.nl

Resources