Scenario: Creating saved search in suite script which contains results having summary type.
Solution:
Check the field types.
- If the field type is numeric (e.g., Integer, Decimal Number), you can use “SUM”, “AVG”, “MIN”, “MAX”.
- If the field type is non-numeric (e.g., Text, List/Record), use “GROUP” or “COUNT”.
If we are using summary types as not mentioned above, then it will throw error in suitescript saved search.