hi. does anyone know of any documentation on `app...
# suitescript
b
hi. does anyone know of any documentation on
app/site/crm/externalcasepage.nl
. I am troubleshooting someone else's work. They have a SuiteService that acts as a proxy that calls the
<http://externalcasepage.nl|externalcasepage.nl>
endpoint for submitting data to custom Case Forms, and the
nlapiRequestURL
(yes, SuiteScript 1.0, unfortunately) is returning a 206 responseCode. sometimes the Case is still created and sometimes it isn't, but it's very inconsistent behavior.
j
I think I've seen 206 response from suitelets (not that endpoint, I know) if there's an uncaught error or no active netsuite session (you know, instead of something standard like 500 or 401). If netsuite is internally consistent it could be something like that. Are you logging the response body if there's a 206 response code?
b
deploying an update to our sandbox environment to log the full response body now, actually.
it looks like the current code uses
nlapiRequestURL
passing in just url & data (no headers or method), so I'm assuming it's defaulting to a 'GET' method, which would be really weird for a form submission
j
IIRC the behavior of nlapiRequestURL is that it changes to POST if the second parameter is not null
i.e.
nlapiRequestURL(url, body, headers, callback)
is POST if body is not null
b
ok - well that's good.
I feel comfortable with
nlapiRequestURL
. I've used it in several other SuiteScripts & SuiteServices I've had to write. This is my first interaction with
externalcasepage
, and I get no results when I search for it in either the Help Center or in SuiteAnswers.
well this isn't helpful:
An unexpected error has occurred. Please go back and try again.
That's essentially all that is in the response body
j
Ha, and it's hidden behind the "success" code 206
b
yeah - we just submitted a ticket to NetSuite asking for more information about what underlying error may be occurring, and I was pretty hard on returning a 206 response code with an HTML body of "An unexpected error has occurred" is technically incorrect and completely useless.