Hello,
Is there a way to use the /query/v1/suiteql endpoint in the REST API to query custom records of a particular type? I can get the information about the custom type itself using this in the request body:
{
"q": "SELECT * FROM CustomRecordType"
}
However, if I try:
{
"q": "SELECT * FROM CustomRecord"
}
I get this message: Invalid search query. Detailed unprocessed description follows. Invalid search type: CustomRecord
Viewing the schema browser at https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2021_1/schema/record/customrecord.html, it looks like that should be a valid table name. The user tied to the token I'm using for my test requests is in the admin role, so I don't think it's a permissions issue.
What I'm trying to do is look up a custom record by a custom field and get the rest of the fields from that record. I'm able to use a different endpoint with the actual customrecordtype ID to at least confirm the record exists, but it only gives me a link and not all the fields. For example, if I call the endpoint:
/record/v1/customrecord110?q=custrecord_ams_gpcode%20IS%20"306-20-4500"
The info returned is:
{
"links": [
{
"rel": "self",
"href": "https://[accountID].suitetalk.api.netsuite.com/services/rest/record/v1/customrecord110?q=custrecord_ams_gpcode+IS+%22306-20-4500%22"
}
],
"count": 1,
"hasMore": false,
"items": [
{
"links": [
{
"rel": "self",
"href": "https://[accountID].suitetalk.api.netsuite.com/services/rest/record/v1/customrecord110/3"
}
],
"id": "3"
}
],
"offset": 0,
"totalResults": 1
}
If there was a way to use that endpoint with something like the expandSubResources to get all the fields, that would also work, but that parameter doesn't seem to have any effect.
Thank you!