``` message: "An nlobjSearchFilter contains an i...
# ask-stanley-ai
r
Copy code
message: "An nlobjSearchFilter contains an invalid summary type: formulanumeric: SUM.",
c
AI generated answer (using internal Slack threads):
The error message
An nlobjSearchFilter contains an invalid summary type: formulanumeric: SUM.
indicates that the summary type
SUM
is not valid for the
formulanumeric
field in a search filter. In NetSuite, when creating a search filter, the
summary
property is used to specify the summary type for the filter. However, not all summary types are valid for all fields. For
formulanumeric
fields, the valid summary types are
GROUP
,
COUNT
,
AVG
,
MIN
,
MAX
, and
SUM
. In the context of the provided conversations, it seems that the issue arises when trying to use the
SUM
summary type with a
formulanumeric
field in a search filter. This could be due to the specific formula used in the
formulanumeric
field, or it could be a limitation of the NetSuite platform. One of the users suggested wrapping the formula in a
SUM()
function, but this did not resolve the issue. Another user suggested using the
MAX
summary type instead, but this also resulted in an error. In the second conversation, a user encountered a similar issue when trying to use the
MAX
summary type with a
formulanumeric
field in a search filter. The user was able to resolve the issue by writing the filter as an array instead of using the
search.createFilter()
method. In the third conversation, a user was trying to calculate a sum at the summary level of a saved search. The user was advised to use parentheses around the value to be summed and to use a summary function around all variables in the equation. In conclusion, it seems that the use of summary types with
formulanumeric
fields in search filters can be tricky and may require some trial and error to get right. If you continue to encounter issues, you may want to consider alternative approaches, such as writing the filter as an array or using a different summary type. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.860725
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.849267
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836662829
Please provide your feedback on this answer.