KM
06/11/2026, 5:00 PMCeligo AI
06/11/2026, 5:01 PMAI generated answer (using internal Slack threads):To render an XML string as a PDF in a new tab using a Suitelet, you can use the
window.open method to open a new tab to the Suitelet, and then make the Suitelet write your file in response to the window.open. However, please note that the window.open method works from the client-side.
Here is a code snippet that you can use:
javascript
context.response.writeFile({
file: yourFile,
isInline: true
});
In this code, context.response.writeFile is used to write the file to the response. The isInline option is set to true, which means the file will be displayed in the browser rather than being downloaded.
Please note that the render module is not supported for Client Script (CS), it is only for User Event (UE).
If you are facing issues with the file not being downloaded as a PDF but as a scriptlet file, you might want to check the headers in your PDF Template. They should start with something like:
xml
<?xml version="1.0"?>
<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
Also, it could be due to settings in your browser (e.g., extensions, cache) or security software. Trying a different browser might help.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
06/11/2026, 5:01 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832946837
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826599181
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825378537
Celigo AI
06/11/2026, 5:01 PM