-
VF Page rendered as pdf download without redirecting to any screen
I've a vf page rendered as pdf which has to be downloaded on click of a button. This button has to be present on detail page of 3 objects: Account, Contact and Opportunity. To support 3 objects, a generic custom controller is written and the button is made a URL type, being opened in existing window. I've added 'content-disposition' through apex to download the page.
The problem is, on click of the button the page goes to a blank screen and the pdf gets downloaded. Is there a way that on button click the pdf gets downloaded and the window stays on the record page without directing to blank screen (or anywhere else)?
Please see attached screenshots of the button and its behaviour.
-
This discussion was modified 6 years, 5 months ago by
Abhishek.
-
This discussion was modified 4 years, 1 month ago by
Forcetalks.
-
This discussion was modified 4 years, 1 month ago by
Forcetalks.
-
This discussion was modified 4 years, 1 month ago by
Forcetalks.
-
This discussion was modified 6 years, 5 months ago by
Log In to reply.
Popular Salesforce Blogs
Upload Data Through CSV File in Visualforce Page | Salesforce Developer Guide
You might have a requirement where you need to upload a csv file in your custom object. In this blog, we’ll see how to upload…
What is a Flow in Salesforce? | All You Need to Know
A flow is a tool that automates complications of business processes in Salesforce. In a few words, it fetches data and then Proceeds with that…
10 Tips to Remember When Migrating from Goldmine to Salesforce
In the past few years, we have witnessed the surge in online CRM software, but nothing competes with Salesforce, not even GoldMine. Therefore, if you…
Popular Salesforce Videos
Salesforce for Marketing
Learn how to bring marketing and engagement together. Salesforce Marketing Cloud helps you connect marketing, sales, service, and more on a single platform. Marketers get…
DreamTX Welcome Day 3: Customer Success | Dreamforce 2020 | Salesforce
If you missed DreamTX DAY 2, then live this amazing experience here, we have covered it all for you. Digital transformation requires more than just…
Getting Started With Business Analysis | Scrum Development Model | Salesforce Tutorial
Learn all about AGILE software development and the scrum development model. 1. Introduction To AGILE Get a brief definition of AGILE and its different modules.…