In a summary search, you must sort by a result field with a summary function error

I have created saved search to group by pay code type and sum amount.

Pay code : Sequence–> Group, Amount–> Sum

Sort by Pay code : Sequence ASC

when I export this search to script and run, i am getting following error.

{“type”:”error.SuiteScriptError”,”name”:”INVALID_SUMMARY_SRCH”,”message”:”In a summary search, you must sort by a result field with a summary function. Please go back and correct the sort by field on the results tab.”,”stack”:[“createError(N/error)”,”getEmployeeAmountTotals(/SuiteScripts/suitelet_transfer_funds_screen.js:160)”,”onRequest(/SuiteScripts/suitelet_transfer_funds_screen.js:185)”],”cause”:{“type”:”internal error”,”code”:”INVALID_SUMMARY_SRCH”,”details”:”In a summary search, you must sort by a result field with a summary function. Please go back and correct the sort by field on the results tab.”,”userEvent”:null,”stackTrace”:[“createError(N/error)”,”getEmployeeAmountTotals(/SuiteScripts/suitelet_transfer_funds_screen.js:160)”,”onRequest(/SuiteScripts/suitelet_transfer_funds_screen.js:185)”],”notifyOff”:false},”id”:””,”notifyOff”:false,”userFacing”:false}

Whats wrong here? Please Help!

Beginner Asked on March 1, 2023 in SuiteScript.
Add Comment
1 Answer(s)

Without knowing more about your saved search setup, maybe these links will help:

http://www.netsuiterp.com/2018/10/preview-saved-search-and-results-to.html –  refers to your error

https://www.reddit.com/r/Netsuite/comments/yvf9mr/purchase_order_saved_search_showing_billed_amount/ – see comment by Nick_AxeusConsulting

https://blog.concentrus.com/netsuite-how-to-utilize-summary-types-in-saved-searches

Let us know if it get resolves and how you achieved it. Good luck.

Beginner Answered on March 24, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor