{ "entity": {"externalId": "28"}, "trandate": "{...
# suitescript
f
{ "entity": {"externalId": "28"}, "trandate": "{{$timestamp}}", "postingperiod": "42", "location": "1", "currency": "1", "duedate" : "2020-05-08T162228.404-07:00", "itemlist": { "items": [{ "item": { "internalid": "23", "line": "1", "amount": "10", "quantity": "1" } }] } }
s
which web services do you refer to? SuiteTalk is XML SOAP based...
f
Netsuite REST webservices
s
oh, that's still in beta I think so I don't touch it.
e
GA with 2020.1
(I think)
s
interesting Eric. Do I recall correctly in that only a subset of record types were available via REST or no?
f
its supposed to be out of beta already, but some parts are still beta
s
If it's GA in 2020.1 it's something I'd be willing to risk early adoption of. IIRC it has a rich/sane search facility as well - should replace restlets I've done to serve that purpose.
f
however...i am having some issues because of the lack of documentation
and lack of examples
s
I don't remember, but in SuiteTalk were you able to reference a related entity using exernalid? Are you sure you don't need an internal id reference there?
f
yes, but even using internal id i am getting some issues
this is my json body: { "entity": { "id": "28" }, "trandate": "2020-04-08T162228.404-07:00", "postingperiod": "42", "currency": "1", "subsidiary": { "id": "1" }, "duedate" : "2020-05-08T162228.404-07:00", "item": { "items": [{ "item": { "id": "27" }, "rate": 10, "line": "1", "amount": "10", "quantity": "1" }] } }
"type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",     "title": "Error while accessing resource: You have entered an Invalid Field Value 1 for the following field: subsidiary",     "status": 400,     "o:errorCode": "USER_ERROR"
and thats the error i get......however i do have a subsidiary 1
s
you should make sure that (customer?) is associated to subsidiary 1