-
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
Using External JavaScript Libraries and CSS Libraries in Lightning Component
In this article you will learn, how to use javascript Libraries and CSS Libraries in Lightning component framework. You can use multiple libraries in your…
How AI-Powered Salesforce Workflows Are Changing Enterprise Operations
An AI-powered Salesforce workflow is a business process where AI agents read CRM and enterprise data, reason about a request, act through Flows, Apex, and…
Salesforce Spring '22 Release - Get to Know the Highlights
Here we are standing at the beginning of a brand new year full of promise and opportunity, both for ourselves (failing resolutions notwithstanding) and our…
Popular Salesforce Videos
AMPscript DateTime Functions in Salesforce Marketing Cloud
Cameron Robert from Datarati demonstrates how to generate, format, and display Date & Time values using AMPscript in Salesforce Marketing Cloud. What you'll learn: »…
Salesforce to Twilio Integration Using MuleSoft | SFDC
Take a look at how Twilio integration with Salesforce is done using MuleSoft. This tutorial will cover the following points - 1. Introduction Learn how…
Salesforce Marketing Cloud on Core for Nonprofits
Marketing Cloud Growth and Advanced Editions are powerful tools that can help you manage your campaigns, analyze your results, and connect with your customers/donors/volunteers. Let's…