The following sample code can be used for creating PDF with picking ticketsof transaction specified by parameter id
and followed by directdownload to the computer:
function downloadPDF(request, response) { var id = request.getParameter("tranid"); var r = nlapiPrintRecord('PICKINGTICKET', id, 'PDF'); response.setContentType(r.getType(), 'transaction'+id+'.pdf', 'attachment'); response.write(r.getValue());}
No comments:
Post a Comment