I need to expose the pdf version of a NetSuite invoice in my ecommerce site. I'm using saved searches to push up invoice header info but I want to be able to click a link and it will download the NetSuite invoice pdf.
Asked
Active
Viewed 1,920 times
3 Answers
2
The link to the PDF of an Invoice record looks like this:
/app/accounting/print/hotprint.nl?regular=T&sethotprinter=T&formnumber=102&id=3253&label=Invoice&printtype=transaction&trantype=custinvc
You can use a formula column in your search that dynamically fills in the correct parameters and generates an appropriate <a>
tag.

erictgrubaugh
- 8,519
- 1
- 20
- 28
-
Wouldn't https://system.na2.netsuite.com need to be prepended to your url? I'm trying to expose the pdf through ecommerce site which means users will not have access to NetSuite. – Raymond Anderson Mar 02 '19 at 13:58
1
You need to mark the PDF files in the File Cabinet to be "Available Without Login", this should provide you with an External URL you can use to download.

Rusty Shackles
- 2,802
- 10
- 11
1
Here is what you can do : taking in consideration that you want the file to be accessible without netsuite login:
To access a file without login, it must be in file cabinet and with "Available without login" checked but when you click on Print in netsuite, this doesn't save the generated file in the file cabinet, so here is what you can do:
- Add a custom transaction body field of type free-text or url.
- Create a userevent script that trigger on aftersubmit (I'm here giving a general idea, so you can set it otherwise if you want).
- Using the "render" (suitescript 2.0) : you can generate the PDF of your Invoice, save the file in the file cabinet with "Available without login" checked.
- After saving the file, reload it and get its external url and save it in the custom field created in (1).
- Updated your Saved Search to add the new field as a result column
- Good luck :)

B. Assem
- 1,058
- 9
- 12