Creating a nested list (i.e., Main List and Filtered Sub-List) in NetSuite

Use Case:

Select a value from a list of values in Field A. The list of available values in Field B is filtered based on the selection in Field A.

Example:

For example, suppose we have the following lists of values in Field A and Field B:

1. Field A (main list): Fruits, Vegetables

2. Field B (sub-list): Apples, Oranges, Spinach, Onions

If the user selects “Fruits” in Field A, then only the values “Apples” and “Oranges” would appear in a Field B. Likewise, if the user selects “Vegetables” in Field B, then only the values “Apples” and “Oranges” would appear in Field B.

How to set this up in NetSuite:

We’ve found some instructions in NetSuite User Group posts that describe how to set up a nested list. But we thought we’d improve on these instructions by providing screenshots as well. In addition, we actually came across instructions for two different methods for setting up nested lists, and based on experience we’ve gained using these methods, we can suggest when it’s better to use one method instead of the other.

Method 1: Setting up a Custom Record Type for the Main List, and a Custom List for the Sub-List

This method is useful if you want to set up your sub-list data directly in the NetSuite UI, because you only need to create custom records for the main list values (and typically you have a much smaller set of main list values than sub-list values), and you can use a multiple select field to select all of the sub-list values that apply to each main list value. However, you cannot import your custom record data using this method, since the custom record uses a multiple select field; so if you want to be able to import your custom record data, you should use Method 2 (below).

1. Setup > Customization > Lists. Create a list for Field B (i.e., the sub-list) – For illustration purposes, we’ll call this new list “Custom List B”.

a. Enter all of the values into this list that can possibly appear in Field B (i.e., the sub-list).

b. Save.

2. Setup > Customization > Record Types > New. Create a new custom record type for Field A (i.e., the main list) – For illustration purposes, we’ll call this new custom record type “Custom Record Type A”.

a. Be sure that Include Name Field is checked

b. Save.

3. On the saved Custom Record Type screen, click on New Field. This field will contain the sub-list (i.e., Custom List B) information – For illustration purposes , we’ll call this “Custom Record Field B”:

a. Type: Multiple Select

b. List/Record: Select Custom List B

c. Save.

4. Setup > Customization > Custom Record Types

a. Click on New Record next to Custom Record Type A to create a new custom record.

b. In the Name field, you will need to enter in the name of the main list value. For example, if we were setting up the Example from above, we would enter “Fruits” in the Name field.

c. In Custom Record Field B, you will select all the Custom List B values that you want to appear when you select this particular main list value (this is a multiple select field, so you can select as many Custom List B values as needed.). For example, if we were setting up the Example from above, we would select “Apples” and “Oranges” in Custom Record Field B.

d. Save.

e. Repeat steps a-d for each main list value that you need to set up. For example, if we were setting up the Example from above, we would create a new custom record, name it “Vegetables”, and then select “Spinach” and “Onions” in Custom Record Field B.

5. Create a new custom field for the main list (this can be whatever type of field you want, i.e., an entity field, CRM field, transaction body field, etc.).

a. Label: name the field – For illustration purposes, we’ll call this “Custom Field A”.

b. Type: List/Record

c. List/Record: Select Custom Record Type A.

d. Applies to: select whatever records this field applies to

e. Save.

6. Create a new custom field for the sub-list (this field will appear on the same form as Custom Field A, so it needs to be the same type of custom field, and be applied to the same type of record):

a. Label: name this field– For illustration purposes, we’ll call this “Custom Field B”.

b. Type: List/Record

c. List/Record: Select Custom List B.

d. Applies to: select the same thing that you selected for Custom Field A

e. Under Sourcing and Filtering:

i. Source List: Select Custom Field A (i.e., this is the field that you created for your main list).

ii. Source From: Select Custom Record Field B (i.e., this is the field on Custom Record Type A that contains the set of Custom List B values which will be displayed based on the value selected in Custom Field A).

f. Save.

Results: This is an example of how it looks when you select a Main List value in the new custom field you just created; the Sub-List values are filtered based on the selection of the main list value:

Method 2: Setting up a Custom List for the Main List, and a Custom Record Type for the Sub-List

This method is useful if you want to use NetSuite’s CSV Import tool to import the sub-list data (i.e., the sub-list data is defined in a custom record type that does not use a multiple select field, so it can be imported in). Importing in the sub-list data is useful if you have a lot of sub-list values. But if you plan to use the NetSuite UI to enter the sub-list data, Method 1 is better, since Method 2 requires you to create a custom record for each sub-list value.

1. Setup > Customization > Lists. Create a list for Field A (i.e., the main list) – For illustration purposes, we’ll call this new list “Custom List A”.

a. Enter all of the values into this list that can possibly appear in Field A (i.e., the main list).

b. Save.

2. Setup > Customization > Record Types > New. Create a new custom record type for Field B (i.e., the sub-list) – For illustration purposes, we’ll call this new custom record type “Custom Record Type B”.

a. Be sure that Include Name Field is checked

b. Save.

3. On the saved Custom Record Type screen, click on New Field. This field will contain the main list (i.e., Custom List A) information – For illustration purposes , we’ll call this “Custom Record Field A”:

a. Type: List/Record

b. List/Record: Select Custom List A

c. Save.

4. Setup > Customization > Custom Record Types

a. Click on New Record next to Custom Record Type B to create a new custom record.

b. In the Name field, you will need to enter in the name of the sub-list value. For example, if we were setting up the Example from above, we would enter “Apples” in the Name field.

c. In Custom Record Field A, you will select the Custom List A value that you will use to filter the main list value. For example, if we were setting up the Example from above, we would select “Fruits” in Custom Record Field A.

d. Save.

e. Repeat steps a-d for each sub-list value that you need to set up. For example, if we were setting up the Example from above, we would create the following new custom records:

i. Name = “Oranges”, Custom Record Field A = “Fruits”

ii. Name = “Spinach”, Custom Record Field A = “Vegetables”

iii. Name = “Onions”, Custom Record Field A = “Vegetables”

5. Create a new custom field for the main list (this can be whatever type of field you want, i.e., an entity field, CRM field, transaction body field, etc.).

a. Label: name the field – For illustration purposes, we’ll call this “Custom Field A”.

b. Type: List/Record

c. List/Record: Select Custom List A.

d. Applies to: select whatever records this field applies to

e. Save.

6. Create a new custom field for the sub-list (this field will appear on the same form as Custom Field A, so it needs to be the same type of custom field, and be applied to the same type of record):

a. Label: name this field– For illustration purposes, we’ll call this “Custom Field B”.

b. Type: List/Record

c. List/Record: Select Custom Record Type B.

d. Applies to: select the same thing that you selected for Custom Field A

e. Under Sourcing and Filtering:

i. Source List: Select Custom Field A (i.e., this is the field that you created for your main list).

ii. Source Filter By: Select Custom Record Field A (i.e., this is the field on Custom Record Type B that contains the Custom List A value, such as “Fruits” or “Vegetables” in our example).

f. Save.

Results: This is an example of how it looks when you select a Main List value in the new custom field you just created; the Sub-List values are filtered based on the selection of the main list value:

- Ron

Tags: , , , ,

No comments yet.

Leave a Reply

*