NetSuite has voluminous documentation. That’s both good news and bad. I never could find an example of how to summarize a joined field. Perhaps it is out there. Who knows? So… I fiddled with it until it surprized me and worked! The answer turned out to be both intuitive and tricky.
Here’s how this works.
- I’ve got a custom table called custom_record_logic_spa_filters
- It has a field called custrecord_spa which joins to custom_record_logic_spas.
- custrecord_customer then joins with Customers
- I want a list of customers.
Here is the code that rolls up by custrecord_spa and also by Customer.
It would be nice to remove the roll up on custrecord_spa. Unfortunately, you can’t. If you pull that level out, it blows up.
In this case, it was easy enough to roll up a list of customers in code after the search completed.
Here is the code in a form you can cut and paste into your project.