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. To resolve this issue, we adhere to two straightforward procedures.
- Create a Saved Search
- Create a Custom Field for inventory items using Saved Search
Create a Saved Search:
- To initiate the process, navigate to the Reports section and proceed to select New Search. Alternatively, you can type “New Saved Search” in the main search bar and 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. At this stage, we have successfully created a saved search and it is now essential to establish a link 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)
- Opt for Free-Form Text (or Integer, depending on the context) as the designated 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.
Do you want to Integrate NetSuite into your project?
Hire us for a Wide Range of Netsuite Development Services