irurzo
08/18/2021, 6:53 AMaddCustomDataSource
, but for testing purposes I commented that out and just left the code as below an still didnt work, I still get an unexpected error
let renderer = render.create();
renderer.setTemplateByScriptId({
scriptId: setupData.ciPDFTemplate,
});
const pdf = renderer.renderAsPdf();
battk
08/18/2021, 6:54 AMbattk
08/18/2021, 6:54 AMirurzo
08/18/2021, 7:03 AMrenderer.addRecord({
templateName: 'header',
record: record.load({
type: 'customrecord_bit_ci_header,
id: 1234
});
});
Just before the setTemplateByScriptId
and still got unexpected error 😤 And is a valid data source, I tested it on the suitelet with the same data and it workedbattk
08/18/2021, 7:04 AMirurzo
08/18/2021, 7:06 AMirurzo
08/18/2021, 7:08 AMrenderer = render.create() -> renderer.addRecord() -> renderer.setTemplateByScriptId() -> renderer.renderAsPdf();
battk
08/18/2021, 7:09 AMirurzo
08/18/2021, 7:09 AMbattk
08/18/2021, 7:11 AMbattk
08/18/2021, 7:11 AMirurzo
08/18/2021, 7:12 AMirurzo
08/18/2021, 7:12 AMbattk
08/18/2021, 7:12 AMirurzo
08/18/2021, 7:27 AMCUSTTMPL_CI_PDF
to this custtmpl_ci_pdf
and now Im getting a MISSING_PDF_PARAMETERS
error 😐battk
08/18/2021, 8:00 AMirurzo
08/18/2021, 8:05 AMbattk
08/18/2021, 8:06 AMbattk
08/18/2021, 8:07 AM