Hi, can we call SavedSearch in Advance PDF templat...
# advancedpdf
a
Hi, can we call SavedSearch in Advance PDF template?
1000 1
f
As a general rule, in this type of architecture (MVC) call something from the View layer, instead you would call something like this from the Controller layer. So create a Suitelet that calls your saved search, and then you can either return the resulting object from the saved search or you could create a new object that you present to the presentation layer. This keeps any kind of logic out of the Presentation layer and will lead to a more robust design.
👍 2
s
You cannot call a saved search, nor load a record, nor perform any other data extraction from within an Advanced PDF directly. Your only options are scripting. As suggested above, a common approach is to create a Suitelet that gathers additional information and produces the enhanced PDF. Another approach, which can be used if you are only adding small amounts of data to an otherwise standard Advanced PDF template, is to create a User Event script that runs on the Print context. You can then inject data into the form via custom page fields that will be available on the PDF template just as if they existed on the record itself.
👍 1