RE: Custom Print Button in Inventory Transfer
Hello
I need some guidance in setting up a custom print button in the inventory transfer form, I see the form has the printing field but the form itself doesn’t have the print button.
Any help would be appreciated.
Hi,
To do the actual printing you’ll need to use that client script function to call a Suitelet and in the Suitelet, do something like this:
let renderer = render.create(); renderer.setTemplateById({ id:123 }); ... scriptContext.response.addHeader({ name: 'Content-Type:', value: 'application/pdf' }); scriptContext.response.addHeader({ name: 'Content-Disposition', value: 'inline; filename=”Test.pdf"' }); scriptContext.response.writeFile(renderer.renderAsPdf());