Nuri Ensing
07/31/2025, 9:00 AMCeligo AI
07/31/2025, 9:01 AMAI generated answer (using internal Slack threads):To get all the PDFs of invoices from one customer, you can use a Map-Reduce SuiteScript. This script will load a search of all the invoices you want to print for a specific customer. The script will then generate all the PDFs and save them into a NetSuite folder. You can then download the entire folder, which will be in a zip file format that you can extract later on to your drive. Here is a simplified version of how you might structure your script:
javascript
/**
* @NApiVersion 2.x
* @NScriptType MapReduceScript
*/
define(['N/search', 'N/render', 'N/file', 'N/record'], function(search, render, file, record) {
function getInputData() {
// Load a search of all the invoices for a specific customer
}
function map(context) {
// Generate a PDF for each invoice
}
function reduce(context) {
// Save each PDF into a NetSuite folder
}
function summarize(summary) {
// Handle errors, logging, or post-processing
}
return {
getInputData: getInputData,
map: map,
reduce: reduce,
summarize: summarize
};
});
Please note that this is a simplified version of the script and you will need to fill in the details for each function based on your specific requirements.
******
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
07/31/2025, 9:01 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827751577
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.824394703
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812512517
Celigo AI
07/31/2025, 9:01 AM