Advanced PDF/HTML Templates and printing
I have created a saved search and clicked the new Template button to create a template based on it. I am wanting to use this template for printing item labels because I need fields from related records and the default print button only uses a template based on a type but my template is based on a saved search. Is there any way around this or do I need to create a custom button and script to use my template.
I think what you are asking, Is there a way to print my template based on a saved search.
If you navigate to your saved search, there will be a print Icon.
Clicking on this will bring up a prompt to select a template.
There will be a Default and ‘Your Template’ Option.
Select ‘Your Template’ option and it will print that saved search using your template.
You can create a custom field to the item that is a hyperlink to generate your print out. The easiest way to do this is to follow the instructions Nathan has provided above and print a label from your search which will give you the URL you need. You can then copy this and where it applies your filters, change these values to source from the record.
‘<a href=https://XXXXXX.app.netsuite.com/app/common/custom/advancedprint/printsearchresults.nl?printType=SEARCH&l=T&e=T&id=643&Item_INTERNALID=’||{id}||’&searchid=643&XXXXXXXXXXXXXXXXXXXXExport&printtemplate=184&whence= target=_blank>Generate Barcode</a>’
In this example where the URL reads ‘&Item_INTERNALID=’ i have removed the actual value and added ‘||{id}||’ so that it will take the Internal ID of whichever item you are clicking the link from instead.
The printtemplate variable relates to your advanced PDF so you could have different links point to different print out versions as well.
Hope this helps.