title: NetSuite Suitelet File Output
body: <p>I've been using Suitelets within NetSuite to generate and return PDF documents for a long time. However, for a while now they've been getting returned as <strong>"scriptlet.nl"</strong> instead of <strong>"filename.pdf"</strong>, which is what I used to get. For the life of me I don't understand why. I've used both of the following with the same results:</p>
  
  <pre><code>function suiteletA(request, response) {
      var xml = "";
      // processing to generate XML
      response.setContentType("PDF", "output.pdf", "inline");
      var file = nlapiXMLToPDF(xml);
      response.write(file.getValue());
  }
  
  function suiteletB(request, response) {
      var xml = "";
      // processing to generate XML
      response.setContentType("PDF", "output.pdf", "inline");
      response.renderPDF(xml);
  }
  </code></pre>
  
  <p>I've looked back through previous code and don't see anything obvious that could explain it. Am I missing something here at all? I don' know if it makes a difference, but I typically work within Chrome, so I can't help but to wonder if that has something to do with it, too, like if something was changed within Chrome to cause a change in results.</p>
  
  <p><strong>-- EDIT --</strong></p>
  
  <p>Here's a screen shot of the response headers...</p>
  
  <p><a href="https://i.stack.imgur.com/x3xNX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x3xNX.png" alt="enter image description here"></a></p>