SuiteQL Response Excluding Null Fields
Hello All,
I’m researching the best way to extract data from NetSuite for our Data Warehouse. I have come across the Rest Web Services, however, a large number of the objects we need are listed under Beta, but it appears those are fully available via the query service.
With that being said, when submitting a simple “select * from” query to the API I get a response which appears to exclude any of the fields that are null. I’d like all columns from said object to return.
Am I missing something simple?
Thanks!
The NetSuite Query Service does exclude null fields from the response by default. However, there is a way to include null fields in the response. To do this, you need to set the includeNullFields parameter to true in your query.
For example, the following query will return all fields from the customer object, including null fields:
SELECT * FROM customer WHERE includeNullFields=true
You can also use the includeNullFields parameter to include null fields in the response for specific fields. For example, the following query will return the name and email fields from the customer object, including null fields:
SELECT name, email FROM customer WHERE includeNullFields=true
The includeNullFields parameter is supported in all versions of the NetSuite Query Service, including the beta versions.
Here is an example of how to use the includeNullFields parameter in the REST Web Services:
GET /query/v2/query?q=SELECT%20*%20FROM%20customer%20WHERE%20includeNullFields=true
This request will return all fields from the customer object, including null fields.
I hope this helps!
Can you explain further on this answer? What is the full url where you are calling query/v2/query? I am familiar with this:
https://sitename.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=5&offset=0
but adding the where clause there does not work.
Thanks, Wayne
I know this is a long shot since it’s spent a while since this was posted.
Can anyone share an example of how this is supposed to work with SuiteQL via REST?
The includeNullFields doesn’t seem to work as part of the header, as a parameter, or as part of the WHERE clause in the body of the call.
I also can’t find that field existing in any NetSuite documentation, or in any web search for “includenullfields” netsuite other than this post.



