Special Nested Search Properties

Documentation article about Special Nested Search Properties

·2 min read·View Oracle Docs

Special Nested Search Properties

Nested Searches

You can use results from one search in the filters of another search. The nested search runs first and returns an array of internal IDs, then the outer search uses those IDs in its filter.

Important:

If you nest searches the wrong way, it can cause performance issues.

Special Nested Search Properties

The all and default properties are a couple of special search options you'll use often. By default, config searches return up to 1000 results. If you set all: true, you can get more than 1000, but it might slow things down. If there are no results results, config returns an empty array, which might cause errors. The default property gives you a fallback value instead.

The example below shows a second search inside another. The second search is on the record customrecord_nxc_cr and returns a map of custrecord_nxc_cr_asset. This field stores the asset and therefore returns the internal ID of the asset found on the record. It uses a default of 0 to avoid issues if there are no results found in the nested search. Any results found are an array of assets internal IDs, and get excluded from the main search because the nested search is inside of this filter: ["internalid","noneof",

json
1"record": "customrecord_nx_asset",
2 "filters": [
3 ["internalid","anyof","${event.caseassets}"],"and",
4 ["internalid","noneof",{
5 "array": true,
6 "default": "0",
7 "assets": {
8 "record": "customrecord_nxc_cr",
9 "filters": [
10 ["custrecord_nxc_cr_case","anyof","${event.supportcase}"],"and",
11 ["custrecord_nxc_cr_task","noneof","${event.internalid}"]
12 ],
13 "map": "custrecord_nxc_cr_asset"
14 }
15 }]
16 ],

Frequently Asked Questions (4)

How can I use results from one search as filters in another search in NetSuite?
In Netsuite, you can perform nested searches by using the results from one search as filters for another. The nested search executes first and returns an array of internal IDs, which the outer search then utilizes in its filters.
What are the potential performance issues with improperly nested searches?
If searches are nested incorrectly, it can lead to performance issues. This is due to the potential complexity and volume of data being processed inappropriately.
How can I retrieve more than 1000 results in a nested search, and what are the consequences?
By setting the `all` property to true, you can retrieve more than the default 1000 results in a nested search. However, this might slow down the search execution due to the increased data being processed.
What happens if there are no results in a nested search and how can I handle this scenario?
If a nested search returns no results, it defaults to an empty array, which might cause errors. To handle this, use the `default` property to specify a fallback value, such as `0`, to avoid issues in the subsequent search.
Source: Special Nested Search Properties Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in General

View all General articles →