Get work orders via services/rest/record and services/rest/query

Hello!

I can get list of orders or a particular order using REST Record service i.e. with get http request to https://account-id.suitetalk.api.netsuite.com/services/rest/record/v1/workorder.

But if I try to do the same via REST Query service i.e. with post http request to https://account-id.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=200

with payload {“q”: “select * from workorder”}, I’ve got an error

{

"type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",

"title": "Bad Request",

"status": 400,

"o:errorDetails": [

{

"detail": "Invalid search query. Detailed unprocessed description follows. Search error occurred: Record 'workorder' was not found.",

"o:errorQueryParam": "q",

"o:errorCode": "INVALID_PARAMETER"

}

]

}

Could somebody please explain to me the difference in record and query services? Why quering does not work for workorder?

 

Rookie Asked on May 18, 2022 in Manufacturing.
Add Comment
2 Answer(s)

Hi,

Whilst workorder is there for convenience when using the standard REST service, it will be a transaction when it comes to SuiteQL.

You should query for transactions where type is workorder.

Thansk,

Chris

Intermediate Answered on May 23, 2022.
Add Comment

Hello Chris,

I’ve got it. Thanks a lot!

Rookie Answered on May 24, 2022.
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