You need to sign in to do that
Don't have an account?
Sorcerer7
Output format for a custom button
On our Opportunity page layout, there is a custom button called "Quote". The code behind this button exports the data into an Excel spreadsheet.
I need to find a way to export it into a different format, preferrably either a Word doc or a PDF.
Here is the code for the button now...
/00OF0000003vtec?export=1&enc=UTF-8&xf=csv&pv0={!Opportunity.Id}
I am hoping it's as easy and just changing the "csv" in the formula to "doc": or "pdf".
Thanks
I need to find a way to export it into a different format, preferrably either a Word doc or a PDF.
Here is the code for the button now...
/00OF0000003vtec?export=1&enc=UTF-8&xf=csv&pv0={!Opportunity.Id}
I am hoping it's as easy and just changing the "csv" in the formula to "doc": or "pdf".
Thanks
http://salesforce.stackexchange.com/questions/13602/custom-link-to-download-export-report-in-single-click
In order to be able to export to pdf, you can use a Visualforce page with the 'RenderAs="pdf"' tag:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_renderas_pdf.htm
All Answers
http://salesforce.stackexchange.com/questions/13602/custom-link-to-download-export-report-in-single-click
In order to be able to export to pdf, you can use a Visualforce page with the 'RenderAs="pdf"' tag:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_renderas_pdf.htm
The code behind the button is redirecting to a SFDC report which is then converted to an excel (as instructed in the query parameter).Currently there is no way to view SFDC report in PDF.So to achieve your requirement, you need to implement a custom VF page that can be rendered as PDF.
Please let me know if this helps.
Regards,
Shashi
Within the code on the page I just need to add the ...renderAs "doc". Is that correct?
<apex: page contentType="application/msWord">
Here is an example:
https://success.salesforce.com/answers?id=90630000000gqOiAAI