SCENARIO:
User is tasked to determine transactions (Vendor Bills and Invoices) in NetSuite where the department specified at the header level differs from the department specified at the line item level.
SOLUTION:
1.) Navigate to Lists > Search > Saved Searches > New
2.) Select Transactions
3.) Results tab
Remove all columns, then add the following:
Type | Summary Type: Group
Transaction Number | Summary Type: Group
Formula (Text) | Summary Type: Maximum | Formula: NS_CONCAT(DISTINCT(CASE WHEN {mainline} = '*' THEN {department} END)) | Label: Header Department
Formula (Text) | Summary Type: Maximum | Formula: NS_CONCAT(DISTINCT(CASE WHEN {mainline} != '*' THEN {department} END)) | Label: Lines Department/s
Formula (Text) | Summary Type: Maximum | Formula: NS_CONCAT(DISTINCT({department})) | Label: All Department/s
3.) Go to Criteria tab > Standard subtab:
Type = Bill, Invoice
4.) Go to Criteria tab > Summary subtab:
Summary Type: Maximum | Field: Formula (Text) | Formula: NS_CONCAT(DISTINCT({department})) | Formula (Text): contains ,
5.) Rename Search
6.) Save and Run
Result:
Let's take a look at Invoice # 89
Department for Header is Department 1, for the line item it's Department 2.
I hope this helps!