Visualforce Page: FTGenerateMultiplePDF

What does this Visualforce Page do?

FTGenerateMultiplePDF allows you to generate multiple PDFs for a number of records via a list view. It is through creating this Visualforce page that you are able to create a button from which to generate multiple PDFs. By default, the FTGenerateMultiplePDF page comes with all standard objects. You can also choose to use it on a custom object in Salesforce.

How do I Create this Visualforce Page on a Custom Object?

  1. Navigate to Salesforce Setup, select home, and search for Visualforce Pages:
  1. Select New to create a Visualforce Page:
  1. Give your Visualforce Page a name and tick ‘Available for Lightning Experience, Experience Builder sites, and the mobile app’
Label, Name, Tick Lightning Experience, Experience Builder sites, and the mobile app
  1. Copy this code:
<apex:page standardController="yourCustomObjApiName__c" recordSetVar="recVar" sidebar="true" lightningStylesheets="true" >
   <apex:includeLightning />
   <apex:form >
    <apex:pageBlock title="Generate Multiple PDF" >
       <apex:pageBlockButtons location="top">
            <apex:commandButton value="Back" action="{!cancel}"/>
        <apex:outputText rendered="{!IF( selected ='' ,true,false)}">
            <apex:pageMessage severity="error" strength="1" summary="{!$Label.form_builder__please_choose_at_least_1_record}" />
    <div id="lightning" />
            var recids = '{!selected}';
            recids = recids.replace(']','');
            recids = recids.replace('[','');
            recids =  recids.replace(/\s/g, '');
                $Lightning.use("Form_Builder:FTPDF", function() {
                  { recids : recids }, "lightning",
                  function(cmp) {});
  1. Paste the code into the Visualforce Markup area:
Paste Code
  1. Replace the text in the StandardController value to the API name of your chosen custom or standard object and select Save:
Enter the API Name of your Custom Object
  1. You are now ready to create a list button from which to generate multiple PDFs based on the Visualforce Page.

How to Video

Hidden Title

Need more help?