hello guys... i have this doubt? can we get all th...
# suitescript
m
hello guys... i have this doubt? can we get all the item information by giving only the upc code in purchase order sublist?
b
i dont really know what you are asking
m
i have one custom column field in purchase order item sublist called 'upc number' sourcing from upc code of item.. If the user enters a value in that custom field, the script would find the associated item and set the item for that line accordingly
k
Wouldnt you be best just using the standard upc field that netsuite provide.
b
you should use a client script's fieldChanged entrypoint to do a search for the matching item, then set that value in the current lines item field
m
var itemSearch = search.create({ type: search.Type.ITEM, filters: [{ name: 'custitem_test', operator: 'is', values: [testValue] }] });
please suggest what to be come in the name field
k
That id of the netsuite upc field. Then in the columns return the internalid of the item.
m
thanks..
b
Honestly you wouldnt even need the internal id column
k
Sorry yeah it comes without the columns. My bad lol
b
Search results have a id key on them
k
always forget that.
m
thanks a lot guys.. its completed.. and working fine.
b
if you want to make your code more robust, you should handle inactive items, and perhaps classification related fields like class or subsidiary
💯 1