• Not a bug, a feature
  • NEWBIE
  • 0 Points
  • Member since 2021
  • Just add coffee

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 7
    Replies
The purpose of my LWC is to search the name of an account and return a list of associated contacts in a list view (table of rows). Every time I try and search for an account in the search bar nothing happens, and I am not sure why. 

Can anyone see what is going wrong? Here is a screen shot of the component along with the code. Any help would be most appreciated. 

LWC Screenshot:
Show Contacts for Searched Account LWC

LWC HTML file: 
<template>
      <lightning-card
        title="How to display the Contacts based on Account Name in LWC"
        custom-icon="custom:icon13"
      >
        <div class="slds slds-p-horizontal--medium">
          <div class="slds-grid slds-wrap">
            <div class="slds-col slds-size_4-of-12 slds-m-bottom--medium">
              <lightning-Input
                type="search"
                placeholder="Search..."
                value={accountName}
                name="accountName"
                class="accountName"
                onchange={handleChangeAccName}
              ></lightning-Input>
            </div>
            <div
              class="slds-col slds-size_6-of-12 slds-m-top--medium"
              style="margin-top: 19px; margin-left: 10px"
            >
              <lightning-button
                label="Search Account Name"
                size="small"
                variant="brand"
                onclick={handleAccountSearch}
                icon-name="utility:search"
                icon-position="right"
              ></lightning-button>
            </div>
          </div>
          <h2>
            Account Name :- <span><strong>{currentAccountName}</strong></span>
          </h2>
          <br />
          <h3>
            <strong><span style="color: brown">{dataNotFound}</span></strong>
          </h3>
          <br />
          <h2
            class="slds-m-bottom--x-small"
            style="color: darkslateblue; font-weight: bold"
          >
            Displaying Contacts Records based on Account Name
          </h2>
          <table
            class="slds-table slds-table_cell-buffer slds-table_bordered"
            border="1"
            cellspacing="0"
            cellpadding="0"
            bordercolor="#ccc"
            style="border-collapse: collapse"
          >
            <thead>
              <tr>
                <th>First Name</th>
                <th>Last Name</th>
                <th>Phone</th>
                <th>Description</th>
              </tr>
            </thead>
            <tbody>
              <template for:each={records} for:item="conItem">
                <tr key={conItem.Id}>
                  <td>{conItem.FirstName}</td>
                  <td>{conItem.LastName}</td>
                  <td>{conItem.Phone}</td>
                  <td>{conItem.Account.Name}</td>
                </tr>
              </template>
            </tbody>
          </table>
        </div>
        <br /><br />
      </lightning-card>
    </template>

LWC JS File:
import { LightningElement, track, wire } from "lwc";
    import retrieveContactData from "@salesforce/apex/fetchAllRelatedRecords.retrieveContact";
    export default class DisplayContactsOnAccountName extends LightningElement {
      @track currentName;
      @track searchName;
      handleChangeAccName(event) {
        this.currentAccountName = event.target.value;
      }
      handleAccountSearch() {
        this.searchName = this.currentName;
      }
      @track records;
      @track dataNotFound;
      @wire(retrieveContactData, { keySearch: "$searchName" })
      wireRecord({ data, error }) {
        if (data) {
          this.records = data;
          this.error = undefined;
          this.dataNotFound = "";
          if (this.records == "") {
            this.dataNotFound = "There is no Contact found related to Account name";
          }
        } else {
          this.error = error;
          this.data = undefined;
        }
      }
    }


LWC XML File:

   
<?xml version="1.0" encoding="UTF-8"?>
    <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>56.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
    <target>lightning__AppPage</target>
    <target>lightning__RecordPage</target>
    <target>lightning__HomePage</target>
    <target>lightning__Tab</target>
    </targets>
    </LightningComponentBundle>

LWC Apex Class:
public with sharing class fetchAllRelatedRecords {
        @AuraEnabled(cacheable=true)
        public static List<Contact> retrieveContact(string keySearch){
            List<Contact> mycontactList = [Select Id, FirstName, LastName, Email, Phone, Account.Name From Contact Where Account.Name=:keySearch];
            return mycontactList;
        }
    }

LWC Apex Class XML File
<?xml version="1.0" encoding="UTF-8"?>
    <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
        <apiVersion>56.0</apiVersion>
        <status>Active</status>
    </ApexClass>

Is there a way to change the name in the tab of my VF Page that gets rendered as a PDF from "External Web Page | Salesforce" to another name that I want? 

User-added image

I need help writing an apex unit test class for my apex controller class that is being used as an extension for a Visual Force page. The function of the class is to query "Intake__c" records and then filter them based on dates fields and a city field to return the filtered values in a variable called "filteredIntakes." Then the controller class passes that collection of records to the VF Page in order for the VF Page to iterate over the collection with an apex:repeat tag. I'm new-ish to writing apex test classes, and I have never written one that involves a controller for a VF page, so I want to make sure I am doing it correctly. Any help (with maybe some examples) would be much appreciated. 

Here is the code for my Apex controller class  PackingListControllerLWC
public with sharing class PackingListControllerLWC {
        public String city{get; set;}
    
        public String startDate{get; set;}
    
        public String endDate{get; set;}
    
        public List<Intake__c> filteredIntakes{get;set;}
    
            public PackingListControllerLWC(ApexPages.StandardController Controller) {
                city = ApexPages.currentPage().getParameters().get('strCity');
                startDate = ApexPages.currentPage().getParameters().get('dtStartDate');
                endDate = ApexPages.currentPage().getParameters().get('dtEndDate');
    
                Date myStartDate = Date.valueOf(startDate);
                Date myEndDate = Date.valueOf(endDate);
    
                DateTime dtStartDate = DateTime.newInstance(myStartDate.year(), myStartDate.month(), myStartDate.day());
                DateTime dtEndDate = DateTime.newInstance(myEndDate.year(), myEndDate.month(), myEndDate.day());
    
                filteredIntakes = getIntakes(dtStartDate, dtEndDate, city);
            }
    
            public List<Intake__c> getIntakes(DateTime dtStartDate, DateTime dtEndDate, String strCity){
    
                Date filterStartDate = (dtStartDate.Date());
                Date filterEndDate = dtEndDate.Date();
                String filterCity = strCity; 
    
                if(String.isNotBlank(filterCity)){
                    filteredIntakes = [SELECT Id, Name, Parent_Name__c, Household__c, Delivery_Date__c, Delivery_Time__c, Intake_Status__c, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                         New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                         Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                         Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c, Baby_Wipes_Num__c, Baby_Formula_Num__c, Formula_Type__c, Additional_Notes__c
                                         FROM Intake__c
                                         WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                         AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate
                                         AND Priority__c = :filterCity LIMIT 10];
                } else {
                    filteredIntakes = [SELECT Id, Name, Parent_Name__c, Household__c, Delivery_Date__c, Delivery_Time__c, Intake_Status__c, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                        New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                        Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                        Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c, Baby_Wipes_Num__c, Baby_Formula_Num__c, Formula_Type__c, Additional_Notes__c
                                        FROM Intake__c
                                        WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                        AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate LIMIT 10];
                }
                for (Intake__c intake : filteredIntakes) {
                    System.debug('Filtered Intake Id: ' + intake.Id +'  '+ intake.Name);
                }
                System.debug('Count Record: ' + filteredIntakes.size());
                return filteredIntakes;
            }
    
        }
Here is the code for the VisualForce Page that feeds the collection of values "FilteredIntakes" into the VisualForce page using an apex:repeat tag.
<apex:page standardController="Intake__c" renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" extensions="PackingListControllerLWC">
    
        <!-- This counts the number of pages being created through <apex:repeat> loop. -->
        <apex:variable var="cnt" value="{!0}" />
        
        <apex:repeat value="{!FilteredIntakes}" var="oneItem">
    
            <!-- Style attribute here uses logic to stop rendering a final page which is left blank -->
            <div style="{!if(cnt < 1, 'page-break-before:avoid;','page-break-before:always;')}">
            
            <apex:pageBlock title="Intake Details">
                <apex:pageBlockSection columns="1">
                    <apex:outputField value="{!oneItem.Name }"/>
                    <apex:outputField value="{!oneItem.Id }"/>
                    <apex:outputField value="{!oneItem.Parent_Name__c }"/>
                    <apex:outputField value="{!oneItem.Household__c }"/>
                    <apex:outputField value="{!oneItem.Priority__c }"/>
                    <apex:outputField value="{!oneItem.Delivery_Date__c }"/>
                    <apex:outputField value="{!oneItem.Delivery_Time__c }"/>
                    <apex:outputField value="{!oneItem.Intake_Status__c }"/>
                </apex:pageBlockSection>
            </apex:pageBlock>
            
            <apex:pageBlock title="Baby Wipes and Formula">
                <apex:pageBlockTable value="{!oneItem}" var="Placeholder" border="2" cellpadding="3" style="text-align: center">
                   <apex:column value="{!oneItem.Baby_Wipes_Num__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Baby_Formula_Num__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Formula_Type__c}" style="text-align: center"/>
                </apex:pageBlockTable>
            </apex:pageBlock>
            
            <apex:pageBlock title="Diaper Box Sizes">
                <apex:pageBlockTable value="{!oneItem}" var="Placeholder" border="2" cellpadding="3" style="text-align: center">
                   <apex:column value="{!oneItem.Diaper_Boxes_Newborn__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Diaper_Boxes_Size_1__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Diaper_Boxes_Size_2__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Diaper_Boxes_Size_3__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Diaper_Boxes_Size_4__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Diaper_Boxes_Size_5__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Diaper_Boxes_Size_6__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Diaper_Boxes_Size_7__c}" style="text-align: center"/>
                </apex:pageBlockTable>
            </apex:pageBlock>
            
            <apex:pageBlock title="Pull Up Sizes">
                <apex:pageBlockTable value="{!oneItem}" var="Placeholder" border="2" cellpadding="3" style="text-align: center">
                   <apex:column value="{!oneItem.Pull_Ups_Boys_Size_2T_3T__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Pull_Ups_Boys_Size_3T_4T__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Pull_Ups_Boys_Size_4T_5T__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Pull_Ups_Girls_Size_2T_3T__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Pull_Ups_Girls_Size_3T_4T__c}" style="text-align: center"/>
                   <apex:column value="{!oneItem.Pull_Ups_Girls_Size_4T_5T__c}" style="text-align: center"/>
                </apex:pageBlockTable>
            </apex:pageBlock>
            
            <apex:outputText value="Page {!cnt+1}" style="text-align: center"/>
    
            <!-- Style attribute here uses logic to stop rendering a final page which is left blank -->            
            <apex:variable var="cnt" value="{!cnt+1}"/>
    
            </div>
        </apex:repeat>
    </apex:page>
And here is the code for my current unit test class. It is deploying to my org correctly, but when I run the test in dev console it fails. I am sure it is not setup correctly, but just wanted to provide an example of what I have already tried.
@isTest
    public class PackingListControllerLWCTest {
        
        @isTest
        static void testGetIntakes() {
            Test.startTest();
            
            Intake__c intake = new Intake__c(Priority__c = 'Pickup Seattle', Delivery_Date__c = date.newInstance(2023, 01, 26));        
    
            insert intake;            //Insert intake record.
        
            //Initialize controller
            ApexPages.StandardController sc = new ApexPages.StandardController(intake);        
            PackingListControllerLWC testPackingListControllerLWC = new PackingListControllerLWC(sc);
        
            PageReference pageRef = Page.intakePdf;        //For e.g.: Page.HelloWorld
            Test.setCurrentPage(pageRef);                //Set Current Page
        
            testPackingListControllerLWC.getIntakes(date.newInstance(2023, 01, 06), date.newInstance(2023, 01, 26), 'Pickup Seattle');  
            Test.stopTest();
            System.AssertNotEquals(null, testPackingListControllerLWC, 'Controller should not be null');
        }
Thank you!

When I preview my VF Page it renders blank (nothing is in the preview). What is wrong with my code? Or am I just testing it wrong? 

Things of note: 

  1. It's using an invocable method and returning a list to be iterated over in the VF Page with apex: repeat 
  2. it's using a custom controller with the logic as an extension and using the standardController for the custom object as the main controller. 
Here is the code for the VF Page: 
 
<apex:page standardController="Intake__c" renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false" extensions="PackingListQueryController" >
 <apex:repeat value="{!FilteredIntakes}" var="oneItem">
    <html>
    <head>
        <style>
            @page {
                size: letter;
                margin: 25mm;
                @top-center {
                    content: "{!oneItem.name }";
                }
                @bottom-center {
                    content: "Page " counter(page) " of " counter(pages);
                }
            }
            .page-break {
                display:block;
                page-break-after:always;
            }
            body {
                font-family: Arial Unicode MS;
            }
        </style>
    </head>
    <body>
        <apex:pageBlock title="Intake Details">
        <apex:pageBlockSection >
        <table width="100%" border="1" cellspacing="0" cellpadding="5" class="print-friendly">
                        <tr>
                            <th>Parent Name</th>
                            <th>Household</th>
                            <th>Delivery Type</th>
                            <th>Delivery Date</th>
                            <th>Delivery Time</th>
                            <th>Intake Status</th>
                        </tr>
                        <tr>
                            <th>{!oneItem.Parent_Name__c }</th>
                             <td class="tableContent">{!oneItem.Household__c }</td>
                             <td class="tableContent">{!oneItem.Priority__c }</td>
                             <td class="tableContent">{!oneItem.Delivery_Date__c }</td>
                             <td class="tableContent">{!oneItem.Delivery_Time__c }</td>
                             <td class="tableContent">{!oneItem.Intake_Status__c }</td>
                       </tr>
            </table>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Intake Details">
    <apex:pageBlockSection >
        <apex:outputField value="{!oneItem.Parent_Name__c }"/>
        <apex:outputField value="{!oneItem.Household__c }"/>
        <apex:outputField value="{!oneItem.Priority__c }"/>
        <apex:outputField value="{!oneItem.Delivery_Date__c }"/>
        <apex:outputField value="{!oneItem.Delivery_Time__c }"/>
        <apex:outputField value="{!oneItem.Intake_Status__c }"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Baby Wipes and Formula">
    <apex:pageBlockTable value="{!oneItem}" var="Baby Wipes and Formula">
       <apex:column value="{!oneItem.Baby_Wipes_Num__c}"/>
       <apex:column value="{!oneItem.Baby_Formula_Num__c}"/>
       <apex:column value="{!oneItem.Formula_Type__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Diaper Boxes">
    <apex:pageBlockTable value="{!oneItem}" var="Diaper Boxes">
       <apex:column value="{!oneItem.Diaper_Boxes_Newborn__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_1__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_2__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_3__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_4__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_5__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_6__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_7__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Pull Ups">
    <apex:pageBlockTable value="{!oneItem}" var="Pull-up Boxes Boys">
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_4T_5T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_4T_5T__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </body>
   </html>
  </apex:repeat>
</apex:page>
Here is the code for the VF Page Controller:
public with sharing class PackingListQueryController {
    //properties used to pass data between VF page and the savepdf method 

    public ApexPages.StandardController controller;
    public Intake__c intake {get; set;}
    public static List<Intake__c> filteredIntakes {get; set;}

    public PackingListQueryController(ApexPages.StandardController controller) { 
        this.controller = controller;
        this.intake = (Intake__c) controller.getRecord();
    }

    //intake Intake_Status__c = "Approved" & Partner_Intake__c = TRUE
    @InvocableMethod(label='Get Filtered Intake Records' description='Get filtered intake records from yields of the flow, filter them again, and return the remaining records')
    public static List<Intake__c> getIntakes(List<Request> params){
        Date filterStartDate;
        Date filterEndDate;
        String filterCity;
        Integer i = 0;
        //[[{startDeliverDate: 2022-01-01, endDeliveryDate: 2022-01-10, city: null}]]
        filterStartDate = params[0].startDeliveryDate;        
        System.debug('Filtered Start Date: ' + filterStartDate);        
        filterEndDate = params[0].endDeliveryDate;
        System.debug('Filtered Info: ' + params[0]); 
        // filterStartDate = Date.newInstance(paramStartDate.year(), paramStartDate.Month(), paramStartDate.Day());
        // filterEndDate = Date.newInstance(paramEndDate.year(), paramEndDate.Month(), paramEndDate.Day());
        filterCity = params[0].city;
        if(String.isNotBlank(filterCity)){
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                 New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                 Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                 Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                 FROM Intake__c
                                 WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                 AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate
                                 AND Priority__c = :filterCity LIMIT 10];
        } else {
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                FROM Intake__c
                                WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate LIMIT 10];
        }
        for (Intake__c intake : filteredIntakes) {
            System.debug('Filtered Intake Id: ' + intake.Id);
        }
        // for (intakeList < filteredIntakes.length(); i++){
        //     System.debug('Filtered Intake Id: ' + filteredIntakes[i].Id);
        // }
        System.debug('Count Record: ' + filteredIntakes.size());
        getFilteredIntakes(filteredIntakes);
        return filteredIntakes;
    }
    public static List<Intake__c> getFilteredIntakes(List<Intake__c> intakeRecords) {
        return intakeRecords;
    }
    //Inner class to store additional params to be stored in a list 'Request'
    public class Request {
        @InvocableVariable(label='Starting Delivery Date' required='true' description='Starting Delivery Date')
        public Date startDeliveryDate;
        @InvocableVariable(label='Ending Delivery Date' required='true' description='Ending Delivery Date')
        public Date endDeliveryDate;
        @InvocableVariable(label='City' description='City')
        public String city;
    }
    public class Response {
        @InvocableVariable(label='Success' description='Successful execution of batch job' required=true)
        public Boolean success = true;
        }
}
Thank you! 
 

User-added image
I am attempting to save a Visual Force page that is accepting input values from a flow and passing them into an invocable method. It keeps saying the custom object I'm using in the invocable method is 'unknown?' (Intake__c)
I tried creating a setter and getter for the Intake__c object, but that didn't work - which is kind of confusing to me in the first place.
Any ideas on why I'm getting this error?

Here is the code for my Visual Force page

<apex:page controller="PackingListQueryController" renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">
<apex:repeat value = "{! FilteredIntakes}" var = "oneItem">
    <html>
    <head>
        <style>
            @page {
                size: letter;
                margin: 25mm;
                @top-center {
                    content: "{! oneItem.name }";
                }
                @bottom-center {
                    content: "Page " counter(page) " of " counter(pages);
                }
            }
            .page-break {
                display:block;
                page-break-after:always;
            }
            body {
                font-family: Arial Unicode MS;
            }
        </style>
    </head>
    <body>
        <apex:pageBlock title="Intake Details">
        <apex:pageBlockSection >
        <table width="100%" border="1" cellspacing="0" cellpadding="5" class="print-friendly">
                        <tr>
                            <th>Parent Name</th>
                            <th>Household</th>
                            <th>Delivery Type</th>
                            <th>Delivery Date</th>
                            <th>Delivery Time</th>
                            <th>Intake Status</th>
                        </tr>
                        <tr>
                                <th>{! Intake__c.Parent_Name__c }</th>
                                <td class="tableContent">{! oneItem.Household__c }</td>
                                <td class="tableContent">{! oneItem.Priority__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Date__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Time__c }</td>
                                <td class="tableContent">{! oneItem.Intake_Status__c }</td>
                            </tr>
            </table>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Intake Details">
    <apex:pageBlockSection >
        <apex:outputField value="{! oneItem.Parent_Name__c }"/>
        <apex:outputField value="{! oneItem.Household__c }"/>
        <apex:outputField value="{! oneItem.Priority__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Date__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Time__c }"/>
        <apex:outputField value="{! oneItem.Intake_Status__c }"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Baby Wipes and Formula">
    <apex:pageBlockTable value="{!oneItem}" var="Baby Wipes and Formula">
       <apex:column value="{!oneItem.Baby_Wipes_Num__c}"/>
       <apex:column value="{!oneItem.Baby_Formula_Num__c}"/>
       <apex:column value="{!oneItem.Formula_Type__c}"/>
    </apex:pageBlockTable>
</apex:pageBlock>
    <apex:pageBlock title="Diaper Boxes">
    <apex:pageBlockTable value="{!Intake__c}" var="Diaper Boxes">
       <apex:column value="{!oneItem.Diaper_Boxes_Newborn__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_1__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_2__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_3__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_4__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_5__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_6__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_7__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Pull Ups">
    <apex:pageBlockTable value="{!oneItem}" var="Pull-up Boxes Boys">
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_4T_5T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_4T_5T__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </body>
   </html>
</apex:repeat>
</apex:page>
Here is the code for the controller my VF Page is pointing to
public with sharing class PackingListQueryController {
    //properties used to pass data between VF page and the savepdf method 
    public static List<Intake__c> filteredIntakes {
        get { return filteredIntakes; }
        set { filteredIntakes = new List<Intake__c>(); }
    }
    public static Intake__c intakes {
        get { return intakes; }
        set { intakes = new Intake__c(); }
     }

     public static Intake__c intakes {get; set;}
    //intake Intake_Status__c = "Approved" & Partner_Intake__c = TRUE
    @InvocableMethod(label='Get Filtered Intake Records' description='Get filtered intake records from yields of the flow, filter them again, and return the remaining records')
    public static List<Intake__c> getIntakes(List<Request> params){
        Date filterStartDate;
        Date filterEndDate;
        String filterCity;
        Integer i = 0;
        //[[{startDeliverDate: 2022-01-01, endDeliveryDate: 2022-01-10, city: null}]]
        filterStartDate = params[0].startDeliveryDate;        
        System.debug('Filtered Start Date: ' + filterStartDate);        
        filterEndDate = params[0].endDeliveryDate;
        System.debug('Filtered Info: ' + params[0]); 
        // filterStartDate = Date.newInstance(paramStartDate.year(), paramStartDate.Month(), paramStartDate.Day());
        // filterEndDate = Date.newInstance(paramEndDate.year(), paramEndDate.Month(), paramEndDate.Day());
        filterCity = params[0].city;
        if(String.isNotBlank(filterCity)){
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                 New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                 Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                 Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                 FROM Intake__c
                                 WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                 AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate
                                 AND Priority__c = :filterCity LIMIT 10];
        } else {
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                FROM Intake__c
                                WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate LIMIT 10];
        }
        for (Intake__c intake : filteredIntakes) {
            System.debug('Filtered Intake Id: ' + intake.Id);
        }
        // for (intakeList < filteredIntakes.length(); i++){
        //     System.debug('Filtered Intake Id: ' + filteredIntakes[i].Id);
        // }
        System.debug('Count Record: ' + filteredIntakes.size());
        returnFilteredIntakes(filteredIntakes);
        return filteredIntakes;
    }
    public static List<Intake__c> returnFilteredIntakes(List<Intake__c> intakeRecords) {
        return intakeRecords;
    }

    //Inner class to store additional params to be stored in a list 'Request'
    public class Request {
        @InvocableVariable(label='Starting Delivery Date' required='true' description='Starting Delivery Date')
        public Date startDeliveryDate;
        @InvocableVariable(label='Ending Delivery Date' required='true' description='Ending Delivery Date')
        public Date endDeliveryDate;
        @InvocableVariable(label='City' description='City')
        public String city;
    }
    public class Response {
        @InvocableVariable(label='Success' description='Successful execution of batch job' required=true)
        public Boolean success = true;
        }
}

 

Hello, I am using an invocable method along with a controller to feed a list of records being returned from the flow and invocable method, into a VF Page in order to render multiple records with the field values as a PDF. When I try to save my new Visual Force page pointing to my controller class I get this error:

User-added imageinvocable method are unknown properties. 
I'm not sure why they are "unknown," and what I can do to make them "known."

Does anyone know how to work through this blocker? 

Here is the VF page code:

 

<apex:page controller="PackingListQueryController" renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">
<apex:repeat value = "{! FilteredIntakes}" var = "oneItem">
    <html>
    <head>
        <style>
            @page {
                size: letter;
                margin: 25mm;
                @top-center {
                    content: "{! oneItem.name }";
                }
                @bottom-center {
                    content: "Page " counter(page) " of " counter(pages);
                }
            }
            .page-break {
                display:block;
                page-break-after:always;
            }
            body {
                font-family: Arial Unicode MS;
            }
        </style>
    </head>
    <body>
        <apex:pageBlock title="Intake Details">
        <apex:pageBlockSection >
        <table width="100%" border="1" cellspacing="0" cellpadding="5" class="print-friendly">
                        <tr>
                            <th>Parent Name</th>
                            <th>Household</th>
                            <th>Delivery Type</th>
                            <th>Delivery Date</th>
                            <th>Delivery Time</th>
                            <th>Intake Status</th>
                        </tr>
                        <tr>
                                <th>{! Intake__c.Parent_Name__c }</th>
                                <td class="tableContent">{! oneItem.Household__c }</td>
                                <td class="tableContent">{! oneItem.Priority__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Date__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Time__c }</td>
                                <td class="tableContent">{! oneItem.Intake_Status__c }</td>
                            </tr>
            </table>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Intake Details">
    <apex:pageBlockSection >
        <apex:outputField value="{! oneItem.Parent_Name__c }"/>
        <apex:outputField value="{! oneItem.Household__c }"/>
        <apex:outputField value="{! oneItem.Priority__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Date__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Time__c }"/>
        <apex:outputField value="{! oneItem.Intake_Status__c }"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Baby Wipes and Formula">
    <apex:pageBlockTable value="{!oneItem}" var="Baby Wipes and Formula">
       <apex:column value="{!oneItem.Baby_Wipes_Num__c}"/>
       <apex:column value="{!oneItem.Baby_Formula_Num__c}"/>
       <apex:column value="{!oneItem.Formula_Type__c}"/>
    </apex:pageBlockTable>
</apex:pageBlock>
    <apex:pageBlock title="Diaper Boxes">
    <apex:pageBlockTable value="{!Intake__c}" var="Diaper Boxes">
       <apex:column value="{!oneItem.Diaper_Boxes_Newborn__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_1__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_2__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_3__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_4__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_5__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_6__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_7__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Pull Ups">
    <apex:pageBlockTable value="{!oneItem}" var="Pull-up Boxes Boys">
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_4T_5T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_4T_5T__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </body>
   </html>
</apex:repeat>
</apex:page>

Here is the code for the VF Page Controller:
 
public with sharing class PackingListQueryController {
    //properties used to pass data between VF page and the savepdf method 
    public List<Intake__c> filteredIntakes = new List<Intake__c>();
    //intake Intake_Status__c = "Approved" & Partner_Intake__c = TRUE
    @InvocableMethod(label='Get Filtered Intake Records' description='Get filtered intake records from yields of the flow, filter them again, and return the remaining records')
    public static List<Intake__c> getIntakes(List<Request> params){
        List<Intake__c> filteredIntakes = new List<Intake__c>();
        Date filterStartDate;
        Date filterEndDate;
        String filterCity;
        Integer i = 0;
        //[[{startDeliverDate: 2022-01-01, endDeliveryDate: 2022-01-10, city: null}]]
        filterStartDate = params[0].startDeliveryDate;        
        System.debug('Filtered Start Date: ' + filterStartDate);        
        filterEndDate = params[0].endDeliveryDate;
        System.debug('Filtered Info: ' + params[0]); 
        // filterStartDate = Date.newInstance(paramStartDate.year(), paramStartDate.Month(), paramStartDate.Day());
        // filterEndDate = Date.newInstance(paramEndDate.year(), paramEndDate.Month(), paramEndDate.Day());
        filterCity = params[0].city;
        if(String.isNotBlank(filterCity)){
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                 New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                 Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                 Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                 FROM Intake__c
                                 WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                 AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate
                                 AND Priority__c = :filterCity LIMIT 10];
        } else {
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                FROM Intake__c
                                WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate LIMIT 10];
        }
        for (Intake__c intake : filteredIntakes) {
            System.debug('Filtered Intake Id: ' + intake.Id);
        }
        // for (intakeList < filteredIntakes.length(); i++){
        //     System.debug('Filtered Intake Id: ' + filteredIntakes[i].Id);
        // }
        System.debug('Count Record: ' + filteredIntakes.size());
        getFilteredIntakes(filteredIntakes);
        return filteredIntakes;
    }
    public static List<Intake__c> getFilteredIntakes(List<Intake__c> intakeRecords) {
        return intakeRecords;
    }
    //Inner class to store additional params to be stored in a list 'Request'
    public class Request {
        @InvocableVariable(label='Starting Delivery Date' required='true' description='Starting Delivery Date')
        public Date startDeliveryDate;
        @InvocableVariable(label='Ending Delivery Date' required='true' description='Ending Delivery Date')
        public Date endDeliveryDate;
        @InvocableVariable(label='City' description='City')
        public String city;
    }
    public class Response {
        @InvocableVariable(label='Success' description='Successful execution of batch job' required=true)
        public Boolean success = true;
        }
}

Any help would be most appreciated. Thank you! 

Hello, I am using an invocable method along with a controller to feed a list of records being returned from the flow and invocable method, into a VF Page in order to render multiple records with the field values as a PDF. When I try to save my new Visual Force page pointing to my controller class I get this error 

User-added imagetelling me a variable and method I am using in my invocable method are unknown properties. 

I'm not sure why they are "unknown," and what I can do to make them "known."

Does anyone know how to work through this blocker? 

Here is the VF page code:

<apex:page controller="PackingListQueryController" renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">
<apex:repeat value = "{! FilteredIntakes}" var = "oneItem">
    <html>
    <head>
        <style>
            @page {
                size: letter;
                margin: 25mm;
                @top-center {
                    content: "{! oneItem.name }";
                }
                @bottom-center {
                    content: "Page " counter(page) " of " counter(pages);
                }
            }
            .page-break {
                display:block;
                page-break-after:always;
            }
            body {
                font-family: Arial Unicode MS;
            }
        </style>
    </head>
    <body>
        <apex:pageBlock title="Intake Details">
        <apex:pageBlockSection >
        <table width="100%" border="1" cellspacing="0" cellpadding="5" class="print-friendly">
                        <tr>
                            <th>Parent Name</th>
                            <th>Household</th>
                            <th>Delivery Type</th>
                            <th>Delivery Date</th>
                            <th>Delivery Time</th>
                            <th>Intake Status</th>
                        </tr>
                        <tr>
                                <th>{! Intake__c.Parent_Name__c }</th>
                                <td class="tableContent">{! oneItem.Household__c }</td>
                                <td class="tableContent">{! oneItem.Priority__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Date__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Time__c }</td>
                                <td class="tableContent">{! oneItem.Intake_Status__c }</td>
                            </tr>
            </table>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Intake Details">
    <apex:pageBlockSection >
        <apex:outputField value="{! oneItem.Parent_Name__c }"/>
        <apex:outputField value="{! oneItem.Household__c }"/>
        <apex:outputField value="{! oneItem.Priority__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Date__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Time__c }"/>
        <apex:outputField value="{! oneItem.Intake_Status__c }"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Baby Wipes and Formula">
    <apex:pageBlockTable value="{!oneItem}" var="Baby Wipes and Formula">
       <apex:column value="{!oneItem.Baby_Wipes_Num__c}"/>
       <apex:column value="{!oneItem.Baby_Formula_Num__c}"/>
       <apex:column value="{!oneItem.Formula_Type__c}"/>
    </apex:pageBlockTable>
</apex:pageBlock>
    <apex:pageBlock title="Diaper Boxes">
    <apex:pageBlockTable value="{!Intake__c}" var="Diaper Boxes">
       <apex:column value="{!oneItem.Diaper_Boxes_Newborn__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_1__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_2__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_3__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_4__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_5__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_6__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_7__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Pull Ups">
    <apex:pageBlockTable value="{!oneItem}" var="Pull-up Boxes Boys">
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_4T_5T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_4T_5T__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </body>
   </html>
</apex:repeat>
</apex:page>

Here is the code for the VF Page Controller

public with sharing class PackingListQueryController {
    //properties used to pass data between VF page and the savepdf method 
    public List<Intake__c> filteredIntakes = new List<Intake__c>();
    //intake Intake_Status__c = "Approved" & Partner_Intake__c = TRUE
    @InvocableMethod(label='Get Filtered Intake Records' description='Get filtered intake records from yields of the flow, filter them again, and return the remaining records')
    public static List<Intake__c> getIntakes(List<Request> params){
        List<Intake__c> filteredIntakes = new List<Intake__c>();
        Date filterStartDate;
        Date filterEndDate;
        String filterCity;
        Integer i = 0;
        //[[{startDeliverDate: 2022-01-01, endDeliveryDate: 2022-01-10, city: null}]]
        filterStartDate = params[0].startDeliveryDate;        
        System.debug('Filtered Start Date: ' + filterStartDate);        
        filterEndDate = params[0].endDeliveryDate;
        System.debug('Filtered Info: ' + params[0]); 
        // filterStartDate = Date.newInstance(paramStartDate.year(), paramStartDate.Month(), paramStartDate.Day());
        // filterEndDate = Date.newInstance(paramEndDate.year(), paramEndDate.Month(), paramEndDate.Day());
        filterCity = params[0].city;
        if(String.isNotBlank(filterCity)){
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                 New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                 Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                 Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                 FROM Intake__c
                                 WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                 AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate
                                 AND Priority__c = :filterCity LIMIT 10];
        } else {
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                FROM Intake__c
                                WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate LIMIT 10];
        }
        for (Intake__c intake : filteredIntakes) {
            System.debug('Filtered Intake Id: ' + intake.Id);
        }
        // for (intakeList < filteredIntakes.length(); i++){
        //     System.debug('Filtered Intake Id: ' + filteredIntakes[i].Id);
        // }
        System.debug('Count Record: ' + filteredIntakes.size());
        getFilteredIntakes(filteredIntakes);
        return filteredIntakes;
    }
    public static List<Intake__c> getFilteredIntakes(List<Intake__c> intakeRecords) {
        return intakeRecords;
    }
    //Inner class to store additional params to be stored in a list 'Request'
    public class Request {
        @InvocableVariable(label='Starting Delivery Date' required='true' description='Starting Delivery Date')
        public Date startDeliveryDate;
        @InvocableVariable(label='Ending Delivery Date' required='true' description='Ending Delivery Date')
        public Date endDeliveryDate;
        @InvocableVariable(label='City' description='City')
        public String city;
    }
    public class Response {
        @InvocableVariable(label='Success' description='Successful execution of batch job' required=true)
        public Boolean success = true;
        }
}
Any help would be most appreciated. Thank you! 
In my org there are records within a custom object. With every approval of one of these records an email gets sent to a recipient with the fields populated from that record into an email via an email template. The client wants a copy of this email attached to the record (on the custom object) so they can view the email on that record in case the email that was previously sent gets lost somewhere. Is it possible to do this? If so, what's the most simple solution. 
In my org there are records within a custom object. With every approval of one of these records an email gets sent to a recipient with the fields populated from that record into an email via a flow that sends an email alert that uses a VF email template. The client wants a copy of this email attached to the record so they can view the email on the record in case the email that was sent gets lost somewhere. Is it possible to do this? If so, what's the most simple solution. 
In my org there are records within a custom object. With every approval of one of these records an email gets sent to a recipient with the fields populated from that record into an email via an email template. The client wants a copy of this email attached to the record so they can view the email on the record in case the email that was sent gets lost somewhere. Is it possible to do this? If so, what's the most simple solution. 
I'm trying to figure out how I can send a report in an email on a yearly basis to all of the primary contacts on my accounts. I have done research and there are some apps like the "Report Sender App" that only sends report emails on a daily, weekly, or monthly basis, but the app doesn't offer a yearly option. What is the best way to accomplish sending a yearly report in an email to all of the accounts within my salesforce instance? 

When I preview my VF Page it renders blank (nothing is in the preview). What is wrong with my code? Or am I just testing it wrong? 

Things of note: 

  1. It's using an invocable method and returning a list to be iterated over in the VF Page with apex: repeat 
  2. it's using a custom controller with the logic as an extension and using the standardController for the custom object as the main controller. 
Here is the code for the VF Page: 
 
<apex:page standardController="Intake__c" renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false" extensions="PackingListQueryController" >
 <apex:repeat value="{!FilteredIntakes}" var="oneItem">
    <html>
    <head>
        <style>
            @page {
                size: letter;
                margin: 25mm;
                @top-center {
                    content: "{!oneItem.name }";
                }
                @bottom-center {
                    content: "Page " counter(page) " of " counter(pages);
                }
            }
            .page-break {
                display:block;
                page-break-after:always;
            }
            body {
                font-family: Arial Unicode MS;
            }
        </style>
    </head>
    <body>
        <apex:pageBlock title="Intake Details">
        <apex:pageBlockSection >
        <table width="100%" border="1" cellspacing="0" cellpadding="5" class="print-friendly">
                        <tr>
                            <th>Parent Name</th>
                            <th>Household</th>
                            <th>Delivery Type</th>
                            <th>Delivery Date</th>
                            <th>Delivery Time</th>
                            <th>Intake Status</th>
                        </tr>
                        <tr>
                            <th>{!oneItem.Parent_Name__c }</th>
                             <td class="tableContent">{!oneItem.Household__c }</td>
                             <td class="tableContent">{!oneItem.Priority__c }</td>
                             <td class="tableContent">{!oneItem.Delivery_Date__c }</td>
                             <td class="tableContent">{!oneItem.Delivery_Time__c }</td>
                             <td class="tableContent">{!oneItem.Intake_Status__c }</td>
                       </tr>
            </table>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Intake Details">
    <apex:pageBlockSection >
        <apex:outputField value="{!oneItem.Parent_Name__c }"/>
        <apex:outputField value="{!oneItem.Household__c }"/>
        <apex:outputField value="{!oneItem.Priority__c }"/>
        <apex:outputField value="{!oneItem.Delivery_Date__c }"/>
        <apex:outputField value="{!oneItem.Delivery_Time__c }"/>
        <apex:outputField value="{!oneItem.Intake_Status__c }"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Baby Wipes and Formula">
    <apex:pageBlockTable value="{!oneItem}" var="Baby Wipes and Formula">
       <apex:column value="{!oneItem.Baby_Wipes_Num__c}"/>
       <apex:column value="{!oneItem.Baby_Formula_Num__c}"/>
       <apex:column value="{!oneItem.Formula_Type__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Diaper Boxes">
    <apex:pageBlockTable value="{!oneItem}" var="Diaper Boxes">
       <apex:column value="{!oneItem.Diaper_Boxes_Newborn__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_1__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_2__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_3__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_4__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_5__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_6__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_7__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Pull Ups">
    <apex:pageBlockTable value="{!oneItem}" var="Pull-up Boxes Boys">
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_4T_5T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_4T_5T__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </body>
   </html>
  </apex:repeat>
</apex:page>
Here is the code for the VF Page Controller:
public with sharing class PackingListQueryController {
    //properties used to pass data between VF page and the savepdf method 

    public ApexPages.StandardController controller;
    public Intake__c intake {get; set;}
    public static List<Intake__c> filteredIntakes {get; set;}

    public PackingListQueryController(ApexPages.StandardController controller) { 
        this.controller = controller;
        this.intake = (Intake__c) controller.getRecord();
    }

    //intake Intake_Status__c = "Approved" & Partner_Intake__c = TRUE
    @InvocableMethod(label='Get Filtered Intake Records' description='Get filtered intake records from yields of the flow, filter them again, and return the remaining records')
    public static List<Intake__c> getIntakes(List<Request> params){
        Date filterStartDate;
        Date filterEndDate;
        String filterCity;
        Integer i = 0;
        //[[{startDeliverDate: 2022-01-01, endDeliveryDate: 2022-01-10, city: null}]]
        filterStartDate = params[0].startDeliveryDate;        
        System.debug('Filtered Start Date: ' + filterStartDate);        
        filterEndDate = params[0].endDeliveryDate;
        System.debug('Filtered Info: ' + params[0]); 
        // filterStartDate = Date.newInstance(paramStartDate.year(), paramStartDate.Month(), paramStartDate.Day());
        // filterEndDate = Date.newInstance(paramEndDate.year(), paramEndDate.Month(), paramEndDate.Day());
        filterCity = params[0].city;
        if(String.isNotBlank(filterCity)){
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                 New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                 Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                 Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                 FROM Intake__c
                                 WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                 AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate
                                 AND Priority__c = :filterCity LIMIT 10];
        } else {
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                FROM Intake__c
                                WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate LIMIT 10];
        }
        for (Intake__c intake : filteredIntakes) {
            System.debug('Filtered Intake Id: ' + intake.Id);
        }
        // for (intakeList < filteredIntakes.length(); i++){
        //     System.debug('Filtered Intake Id: ' + filteredIntakes[i].Id);
        // }
        System.debug('Count Record: ' + filteredIntakes.size());
        getFilteredIntakes(filteredIntakes);
        return filteredIntakes;
    }
    public static List<Intake__c> getFilteredIntakes(List<Intake__c> intakeRecords) {
        return intakeRecords;
    }
    //Inner class to store additional params to be stored in a list 'Request'
    public class Request {
        @InvocableVariable(label='Starting Delivery Date' required='true' description='Starting Delivery Date')
        public Date startDeliveryDate;
        @InvocableVariable(label='Ending Delivery Date' required='true' description='Ending Delivery Date')
        public Date endDeliveryDate;
        @InvocableVariable(label='City' description='City')
        public String city;
    }
    public class Response {
        @InvocableVariable(label='Success' description='Successful execution of batch job' required=true)
        public Boolean success = true;
        }
}
Thank you! 
 

Hello, I am using an invocable method along with a controller to feed a list of records being returned from the flow and invocable method, into a VF Page in order to render multiple records with the field values as a PDF. When I try to save my new Visual Force page pointing to my controller class I get this error:

User-added imageinvocable method are unknown properties. 
I'm not sure why they are "unknown," and what I can do to make them "known."

Does anyone know how to work through this blocker? 

Here is the VF page code:

 

<apex:page controller="PackingListQueryController" renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">
<apex:repeat value = "{! FilteredIntakes}" var = "oneItem">
    <html>
    <head>
        <style>
            @page {
                size: letter;
                margin: 25mm;
                @top-center {
                    content: "{! oneItem.name }";
                }
                @bottom-center {
                    content: "Page " counter(page) " of " counter(pages);
                }
            }
            .page-break {
                display:block;
                page-break-after:always;
            }
            body {
                font-family: Arial Unicode MS;
            }
        </style>
    </head>
    <body>
        <apex:pageBlock title="Intake Details">
        <apex:pageBlockSection >
        <table width="100%" border="1" cellspacing="0" cellpadding="5" class="print-friendly">
                        <tr>
                            <th>Parent Name</th>
                            <th>Household</th>
                            <th>Delivery Type</th>
                            <th>Delivery Date</th>
                            <th>Delivery Time</th>
                            <th>Intake Status</th>
                        </tr>
                        <tr>
                                <th>{! Intake__c.Parent_Name__c }</th>
                                <td class="tableContent">{! oneItem.Household__c }</td>
                                <td class="tableContent">{! oneItem.Priority__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Date__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Time__c }</td>
                                <td class="tableContent">{! oneItem.Intake_Status__c }</td>
                            </tr>
            </table>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Intake Details">
    <apex:pageBlockSection >
        <apex:outputField value="{! oneItem.Parent_Name__c }"/>
        <apex:outputField value="{! oneItem.Household__c }"/>
        <apex:outputField value="{! oneItem.Priority__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Date__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Time__c }"/>
        <apex:outputField value="{! oneItem.Intake_Status__c }"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Baby Wipes and Formula">
    <apex:pageBlockTable value="{!oneItem}" var="Baby Wipes and Formula">
       <apex:column value="{!oneItem.Baby_Wipes_Num__c}"/>
       <apex:column value="{!oneItem.Baby_Formula_Num__c}"/>
       <apex:column value="{!oneItem.Formula_Type__c}"/>
    </apex:pageBlockTable>
</apex:pageBlock>
    <apex:pageBlock title="Diaper Boxes">
    <apex:pageBlockTable value="{!Intake__c}" var="Diaper Boxes">
       <apex:column value="{!oneItem.Diaper_Boxes_Newborn__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_1__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_2__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_3__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_4__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_5__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_6__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_7__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Pull Ups">
    <apex:pageBlockTable value="{!oneItem}" var="Pull-up Boxes Boys">
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_4T_5T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_4T_5T__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </body>
   </html>
</apex:repeat>
</apex:page>

Here is the code for the VF Page Controller:
 
public with sharing class PackingListQueryController {
    //properties used to pass data between VF page and the savepdf method 
    public List<Intake__c> filteredIntakes = new List<Intake__c>();
    //intake Intake_Status__c = "Approved" & Partner_Intake__c = TRUE
    @InvocableMethod(label='Get Filtered Intake Records' description='Get filtered intake records from yields of the flow, filter them again, and return the remaining records')
    public static List<Intake__c> getIntakes(List<Request> params){
        List<Intake__c> filteredIntakes = new List<Intake__c>();
        Date filterStartDate;
        Date filterEndDate;
        String filterCity;
        Integer i = 0;
        //[[{startDeliverDate: 2022-01-01, endDeliveryDate: 2022-01-10, city: null}]]
        filterStartDate = params[0].startDeliveryDate;        
        System.debug('Filtered Start Date: ' + filterStartDate);        
        filterEndDate = params[0].endDeliveryDate;
        System.debug('Filtered Info: ' + params[0]); 
        // filterStartDate = Date.newInstance(paramStartDate.year(), paramStartDate.Month(), paramStartDate.Day());
        // filterEndDate = Date.newInstance(paramEndDate.year(), paramEndDate.Month(), paramEndDate.Day());
        filterCity = params[0].city;
        if(String.isNotBlank(filterCity)){
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                 New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                 Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                 Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                 FROM Intake__c
                                 WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                 AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate
                                 AND Priority__c = :filterCity LIMIT 10];
        } else {
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                FROM Intake__c
                                WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate LIMIT 10];
        }
        for (Intake__c intake : filteredIntakes) {
            System.debug('Filtered Intake Id: ' + intake.Id);
        }
        // for (intakeList < filteredIntakes.length(); i++){
        //     System.debug('Filtered Intake Id: ' + filteredIntakes[i].Id);
        // }
        System.debug('Count Record: ' + filteredIntakes.size());
        getFilteredIntakes(filteredIntakes);
        return filteredIntakes;
    }
    public static List<Intake__c> getFilteredIntakes(List<Intake__c> intakeRecords) {
        return intakeRecords;
    }
    //Inner class to store additional params to be stored in a list 'Request'
    public class Request {
        @InvocableVariable(label='Starting Delivery Date' required='true' description='Starting Delivery Date')
        public Date startDeliveryDate;
        @InvocableVariable(label='Ending Delivery Date' required='true' description='Ending Delivery Date')
        public Date endDeliveryDate;
        @InvocableVariable(label='City' description='City')
        public String city;
    }
    public class Response {
        @InvocableVariable(label='Success' description='Successful execution of batch job' required=true)
        public Boolean success = true;
        }
}

Any help would be most appreciated. Thank you! 

Hello, I am using an invocable method along with a controller to feed a list of records being returned from the flow and invocable method, into a VF Page in order to render multiple records with the field values as a PDF. When I try to save my new Visual Force page pointing to my controller class I get this error 

User-added imagetelling me a variable and method I am using in my invocable method are unknown properties. 

I'm not sure why they are "unknown," and what I can do to make them "known."

Does anyone know how to work through this blocker? 

Here is the VF page code:

<apex:page controller="PackingListQueryController" renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">
<apex:repeat value = "{! FilteredIntakes}" var = "oneItem">
    <html>
    <head>
        <style>
            @page {
                size: letter;
                margin: 25mm;
                @top-center {
                    content: "{! oneItem.name }";
                }
                @bottom-center {
                    content: "Page " counter(page) " of " counter(pages);
                }
            }
            .page-break {
                display:block;
                page-break-after:always;
            }
            body {
                font-family: Arial Unicode MS;
            }
        </style>
    </head>
    <body>
        <apex:pageBlock title="Intake Details">
        <apex:pageBlockSection >
        <table width="100%" border="1" cellspacing="0" cellpadding="5" class="print-friendly">
                        <tr>
                            <th>Parent Name</th>
                            <th>Household</th>
                            <th>Delivery Type</th>
                            <th>Delivery Date</th>
                            <th>Delivery Time</th>
                            <th>Intake Status</th>
                        </tr>
                        <tr>
                                <th>{! Intake__c.Parent_Name__c }</th>
                                <td class="tableContent">{! oneItem.Household__c }</td>
                                <td class="tableContent">{! oneItem.Priority__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Date__c }</td>
                                <td class="tableContent">{! oneItem.Delivery_Time__c }</td>
                                <td class="tableContent">{! oneItem.Intake_Status__c }</td>
                            </tr>
            </table>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Intake Details">
    <apex:pageBlockSection >
        <apex:outputField value="{! oneItem.Parent_Name__c }"/>
        <apex:outputField value="{! oneItem.Household__c }"/>
        <apex:outputField value="{! oneItem.Priority__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Date__c }"/>
        <apex:outputField value="{! oneItem.Delivery_Time__c }"/>
        <apex:outputField value="{! oneItem.Intake_Status__c }"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="Baby Wipes and Formula">
    <apex:pageBlockTable value="{!oneItem}" var="Baby Wipes and Formula">
       <apex:column value="{!oneItem.Baby_Wipes_Num__c}"/>
       <apex:column value="{!oneItem.Baby_Formula_Num__c}"/>
       <apex:column value="{!oneItem.Formula_Type__c}"/>
    </apex:pageBlockTable>
</apex:pageBlock>
    <apex:pageBlock title="Diaper Boxes">
    <apex:pageBlockTable value="{!Intake__c}" var="Diaper Boxes">
       <apex:column value="{!oneItem.Diaper_Boxes_Newborn__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_1__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_2__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_3__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_4__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_5__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_6__c}"/>
       <apex:column value="{!oneItem.Diaper_Boxes_Size_7__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="Pull Ups">
    <apex:pageBlockTable value="{!oneItem}" var="Pull-up Boxes Boys">
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Boys_Size_4T_5T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_2T_3T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_3T_4T__c}"/>
       <apex:column value="{!oneItem.Pull_Ups_Girls_Size_4T_5T__c}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </body>
   </html>
</apex:repeat>
</apex:page>

Here is the code for the VF Page Controller

public with sharing class PackingListQueryController {
    //properties used to pass data between VF page and the savepdf method 
    public List<Intake__c> filteredIntakes = new List<Intake__c>();
    //intake Intake_Status__c = "Approved" & Partner_Intake__c = TRUE
    @InvocableMethod(label='Get Filtered Intake Records' description='Get filtered intake records from yields of the flow, filter them again, and return the remaining records')
    public static List<Intake__c> getIntakes(List<Request> params){
        List<Intake__c> filteredIntakes = new List<Intake__c>();
        Date filterStartDate;
        Date filterEndDate;
        String filterCity;
        Integer i = 0;
        //[[{startDeliverDate: 2022-01-01, endDeliveryDate: 2022-01-10, city: null}]]
        filterStartDate = params[0].startDeliveryDate;        
        System.debug('Filtered Start Date: ' + filterStartDate);        
        filterEndDate = params[0].endDeliveryDate;
        System.debug('Filtered Info: ' + params[0]); 
        // filterStartDate = Date.newInstance(paramStartDate.year(), paramStartDate.Month(), paramStartDate.Day());
        // filterEndDate = Date.newInstance(paramEndDate.year(), paramEndDate.Month(), paramEndDate.Day());
        filterCity = params[0].city;
        if(String.isNotBlank(filterCity)){
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                 New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                 Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                 Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                 FROM Intake__c
                                 WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                 AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate
                                 AND Priority__c = :filterCity LIMIT 10];
        } else {
            filteredIntakes = [SELECT Id, Name, Street_Address__c, City__c, State__c, Zip_Code__c, Priority__c, Number_of_Families_Served__c, Number_of_Children_Served__c, 
                                New_Families__c, Diaper_Boxes_Newborn__c, Diaper_Boxes_Size_1__c, Diaper_Boxes_Size_2__c, Diaper_Boxes_Size_3__c, Diaper_Boxes_Size_4__c, 
                                Diaper_Boxes_Size_5__c, Diaper_Boxes_Size_6__c, Diaper_Boxes_Size_7__c, Pull_Ups_Boys_Size_2T_3T__c, Pull_Ups_Boys_Size_3T_4T__c, Pull_Ups_Boys_Size_4T_5T__c,
                                Pull_Ups_Girls_Size_2T_3T__c, Pull_Ups_Girls_Size_3T_4T__c, Pull_Ups_Girls_Size_4T_5T__c
                                FROM Intake__c
                                WHERE Intake_Status__c = 'Approved' AND Partner_Intake__c = TRUE
                                AND Delivery_Date__c >= :filterStartDate AND Delivery_Date__c <= :filterEndDate LIMIT 10];
        }
        for (Intake__c intake : filteredIntakes) {
            System.debug('Filtered Intake Id: ' + intake.Id);
        }
        // for (intakeList < filteredIntakes.length(); i++){
        //     System.debug('Filtered Intake Id: ' + filteredIntakes[i].Id);
        // }
        System.debug('Count Record: ' + filteredIntakes.size());
        getFilteredIntakes(filteredIntakes);
        return filteredIntakes;
    }
    public static List<Intake__c> getFilteredIntakes(List<Intake__c> intakeRecords) {
        return intakeRecords;
    }
    //Inner class to store additional params to be stored in a list 'Request'
    public class Request {
        @InvocableVariable(label='Starting Delivery Date' required='true' description='Starting Delivery Date')
        public Date startDeliveryDate;
        @InvocableVariable(label='Ending Delivery Date' required='true' description='Ending Delivery Date')
        public Date endDeliveryDate;
        @InvocableVariable(label='City' description='City')
        public String city;
    }
    public class Response {
        @InvocableVariable(label='Success' description='Successful execution of batch job' required=true)
        public Boolean success = true;
        }
}
Any help would be most appreciated. Thank you! 
In my org there are records within a custom object. With every approval of one of these records an email gets sent to a recipient with the fields populated from that record into an email via an email template. The client wants a copy of this email attached to the record so they can view the email on the record in case the email that was sent gets lost somewhere. Is it possible to do this? If so, what's the most simple solution.