Hi All, is there anyway to force creation of PDF (...
# suitescript
g
Hi All, is there anyway to force creation of PDF (non-advance) of a SO to use a different custom form (which has a different PDF layout)?
Copy code
var file = nlapiPrintRecord('TRANSACTION', '469359', 'PDF', {'TRANSACTION': '133'});
    response.setContentType(file.getType());
    response.write(file.getValue());
transaction has 'customform' value of 104 and wanted to create a script that will create a PDF but uses custom form 133
j
We have a script that was created by the developer prior to me... The way he did it was to change the customform field >> perform the pdf merge operation >> change the form back. Not sure if this works for your use case though. This is how we change a normal SO/PO to a BOL template during an after save send email.
g
I have thought of this though. 🙂 This will be my last resort. Thanks!
p
you don't need additional script to do that. all you need to do is create multiple forms and assign the template to the forms. then define the form when you call the nlapiPrintRecord.
g
@Patrick A. Thanks but have you seen my code? I've already done that. I have 2 custom forms with IDs 104 and 133.
the transaction has customform value of 104, and I tried specifying 133 during my nlapiPrintRecord call
@Patrick A. am I passing the correct hash table value to force the customform value?