-
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 4 years, 8 months ago by
Abhishek.
-
This discussion was modified 2 years, 4 months ago by
Forcetalks.
-
This discussion was modified 2 years, 4 months ago by
Forcetalks.
-
This discussion was modified 2 years, 4 months ago by
Forcetalks.
-
This discussion was modified 4 years, 8 months ago by
Log In to reply.
Popular Salesforce Blogs

15 Salesforce Admin Tools You Must Have for a Smooth Workflow
You need the most powerful and impactful Salesforce admin tools and tech help to automate your workflow, maximizing productivity. In a tech world, you must…

Salesforce CRM Analytics Comprehensive Overview: Capabilities, Key AI Features and Benefits
As the demand for accurate foresight intensifies, a new force emerges: predictive analytics. This groundbreaking approach gives organizations the power to forecast future outcomes with…

How Virtual Salesforce Administrators Help with Automation
Robotic Process Automation (RPA) for Salesforce is a tool that allows you to automate certain tasks. This virtual Salesforce administrator can be helpful if you…
Popular Salesforce Videos
Creating a To-do List with Custom Events | Salesforce Developer Quick Takes
Creating a ToDo list will show us how we can take data from one component and pass it to another. In our ToDo list component,…
Why Should You Attend Dreamforce To You 2020
Dreamforce - The event which brings together the entire Salesforce community is just around the corner. Learn why there’s so much hype around this mega…
What Is Loyalty Management in Salesforce? | Video Tutorial
In the past few years, we have come across terms such as loyalty programs and loyalty management. Let's understand the concept of loyalty management with…