php - How to get a summary from a saved search using suite talk Netsuite API

Solution:

You can't. The error is because searches with summary columns are not supported in Suite Talk SOAP web services. In the help for Advanced Searches in SOAP Web Services:

  • If you reference a saved search that contains summary results, you will get the following error:

We cannot return search columns for summary saved search < saved search ID >

Answer

Solution:

As Brian mentioned, Netsuite SuiteTalk doesn't support Summary or formulas in saved search columns. Therefore, What I would do, would create a custom field, make it hidden and do the calculation of the summary in a user event script After Record Submit (if the logic wouldn't harm the performance, otherwise, you can do that by writing a scheduled script to run nightly) and in your search, you can reference that column and use that field in your search results.

Thanks.

Source