I'm trying out Restlets for the first time and I am having trouble returning any data.
I've built a basic restlet and deployed it in NetSuite. The code is as follows:
function getRESTlet(type,dataIn) { return nlapiLoadRecord(dataIn.recordtype, dataIn.id); // e.g recordtype="customer", id="769" }Using Chromes' REST Console application I've set up the following:Request URI: <a target="_blank" href="https://rest.netsuite.com/app/site/hosting/restlet.nl?script=123&deploy=1&recordtype=customer&id=2409">https://rest.netsuite.com/app/site/hosting/restlet.nl?script=123&deploy=1&recordtype=customer&id=2409</a> Request Headers: NLAuth nlauth_account=123456,nlauth_email=email@emailaddy.com,nlauth_signature=password
Running it as a GET operation I return the following error:error code: UNEXPECTED_ERROR error message:TypeError: Cannot read property "recordtype" from undefined (getCustomer.js#14)
I've also removed customer and id from the request URI and instead listed them in the Request Payload section of REST Console with no resolution.Any ideas on what I'm doing wrong?