Sometimes, we are required to have some complex or calculated data in NetSuite under a custom field for any Record Type which can’t be achieved simply by using the formula field and sourcing. In this article, we are about see that how can we create a Saved Search and link it to a Custom Item Field. Let’s begin it with a simple use case or problem.
Assuming, we are required to show stocks (item available) of two different countries in two different custom fields for each inventory item e.g Show United States and Canada available items quantity in two different fields. Currently, NetSuite doesn’t have any built-in method to do this. So, here are 2 simple steps we follow to fix this problem.
- Create a Saved Search
- Create a Custom Field for inventory items using Saved Search
Create a Saved Search:
- Go to Reports -> New Search (Or write in the main search “New Saved Search” then click on “Page: New Saved Search”)
- Select Item (From “Record Types” list)
- From Saved Search Form:
- Give Search an appropriate title (Example: Available items in US Search)
- Check “Public”
- Add a filter under Criteria -> Standard
- Filter: Inventory Location: Country
- Description: Is United States
- Add a result column under Results -> Column
- Field: Location Available
- Summary Type: Sum
- Select filter under Available Filters
- Filter: Internal ID (This will play an important role to link and filter search result for a specific item)
- Click on Save & Run.
This kind of search can be created for any Record Type in NetSuite. So far, we have made a saved search and now it’s time to link this with a custom field.
Create a custom field for item using Saved Search:
- Go to Customization -> Lists, Records & Fields -> Item Fields -> New
- From Custom Item Field Form:
- Give Field a label (Example: Available items in US)
- Choose Free-Form Text (or Integer in this case) as Type
- Un-check “Store Value” checkbox
- Under Applies To (Tab)
- Check Inventory Item
- Under Validation & Defaulting:
- Select newly created search under “Search” dropdown (Available items in US Search)
- Save & Apply to Forms.
That’s it. Go to any inventory item under Custom Tab and see that field (Available items in US).
This is one of the very useful features in NetSuite Development and Administration. There is a lot of possibility for utilizing this feature like showing item categorization under sales order, customer orders and estimate counts and many more.
PS: You should have some items in your stock to view the result properly.