Discussions
It’s that time of the year again! As we embrace the holiday cheer, we want to share an important announcement regarding our holiday schedule. Our dedicated team of NetSuite Support Gurus will be taking a short break to recharge during the holidays, from December 24, 2024, to January 1, 2025. We’ll be back in full swing, ready to assist you on January 2nd. During the break, feel free to explore the wealth of NetSuite resources on our platform.
As we celebrate the season's joys, we are incredibly grateful for your ongoing support and engagement. Have a fantastic holiday break, and let's gear up for an incredible 2025!
Here are some examples to get your creative juices flowing.
"Did I pay vendor John Doe last month?"
"Take me to my largest sales order for this month."
"What invoices haven't been paid yet?"
nlapiRequestURL PDF download - Unexpected error
Hi,
I am trying to download 2 PDF files from RESTLet code - both from different hosts/urls. Once succeeds, the other fails with an "unexpected error" when nlapiReuqestURL is called.
The calling code is the same, just the URL differs:
// Setting up Headers
var headers = new Array();
headers['Accept'] = 'application/json'; // must be json (null or pdf returns "not acceptable" from the server side)
headers['Content-Type'] = 'application/json';
headers['Authorization'] = 'Bearer ' + access_token;
headers['client_id'] = client_id;
// Submit Request - Throws "Unexpected Error"
var response = nlapiRequestURL( encodeURI(myURL), null, headers );
NOTE: The token code works fine for simple API endpoints that return JSON. It;s only when I ask for a PDF file that it filas so it's not that.