Hi! Is it possible to get a dynamic URL for an adv...
# advancedpdf
j
Hi! Is it possible to get a dynamic URL for an advanced PDF? My customer wants to reach a print from a sublist for a particular record and the only way I can figure out how to do this is by using an inline HTML using a dynamic url. Any takes? Thank you!
v
What part of the URL are you wanting to change? I do this all the time via inline HTML and passing values from the record in via the formula, I'll paste an example below
This current example is passing the record ID to saved search results for filtering (because the record currently isn't supported by advanced PDF so i had to sort of do this as a hack) The ID of the search & the Advanced PDF template are in here
'<br><a href="/app/common/custom/advancedprint/printsearchresults.nl?printType=SEARCH&l=T&e=T&id=4815&PickTask_WAVENAME=' || {id} || '&searchid=4815&csv=Export&printtemplate=170&whence=" target="_blank" style="font-family: Open Sans,Helvetica,sans-serif;font-size: 14px !important;font-weight: 600;text-decoration:none;background-color:#238ccd;color:#ffffff;padding:4px 12px 4px 12px;border: 1px solid #2370cd;border-radius:3px;">Print Picked Ticket</a><br>'
looks like this on the record
j
I assume your pdf print is based on a saved search? In my example I want to reach the “BoM print” (standard pdf) via an url and I don’t manage to find any part of the url which I can make dynamic like your example above
v
yeah it's based on a saved search
the parameter for advanced pdf template is &printtemplate=XXX
what sublist exactly are you trying to print
j
We have a custom record that store work orders in a sublist. In this subsist our customer want a column with a link to print the WO BoM instead of open up a WO and press the print button.
v
ohhhh
so is your sublist generated from a search then?
j
Correct
v
if you are able to get to the work order ID from that saved search you could probably do a urls omething like: /app/accounting/print/hotprint.nl?regular=T&sethotprinter=T&formnumber=146&trantype=workord&&id=4775442&label=Bill+of+Materials&printtype=bom
(with your own IDs instead of mine)
j
Thanks I will try this. I didn’t get a similar url when printing but let’s try it out 👍🏼
v
ok.. best of luck, hope it works for you
👍 1