Koon Kabob
05/23/2024, 11:36 PMalien4u
05/23/2024, 11:39 PMEdgar Valdes
05/23/2024, 11:47 PMKoon Kabob
05/23/2024, 11:55 PMKoon Kabob
05/23/2024, 11:55 PMfunction Create_Pdf_files(recType, recordInternalId) {
try {
nlapiLogExecution('debug', "Printing " + recType + " Internal ID " + recordInternalId);
var transNumber = nlapiLookupField('transaction', recordInternalId, 'transactionnumber');
var fileName = transNumber + '.PDF';
var Pdf_Object = nlapiPrintRecord('TRANSACTION', recordInternalId, 'PDF');
Pdf_Object.setFolder(XXX); // <--- Replace 'XXX' with the internal ID of the folder where you want to save the PDFs.
Pdf_Object.setName(fileName);
nlapiSubmitFile(Pdf_Object);
// nlapiSendEmail(XXX,XXX,'This Record Has Been Printed','Test','<mailto:your_email_address@gmail.com|your_email_address@gmail.com>',null); // <--- Uncomment this line to send an email notification.
} catch (err) {
nlapiLogExecution('debug', "Error Printing " + recType + " Internal ID " + recordInternalId, err);
}
}
Koon Kabob
05/23/2024, 11:56 PMalien4u
05/24/2024, 12:05 AMKoon Kabob
05/24/2024, 12:15 AMtdietrich
05/24/2024, 1:07 AMShawn Talbert
05/24/2024, 5:00 PMtdietrich
05/24/2024, 6:56 PM