Annual Statements - FAQ

1. PDFs are not being stored against the Contact

Please check all of the following:

  1. PDFs are only created and saved during Generate phase.  They are not generated and saved again when sending
  2. Statements are only generated for Contacts that are Campaign members of the Statement Campaign
  3. Check if there are any errors logged on Payments2us Error logs. If any, please see FAQ 5.
  4. The Statements are stored in Notes & Attachments related list of Contact and NOT in Files related list.
  5. Make sure you have Statement Letter specified on the Campaign.

6.  If you are on a release prior to 5.4, then you need to disable a critical update for "PageReference getContent() and getContentAsPDF() Methods Treated as Callouts"

This is done by going to setup (top right), then enter "Critical Update" in the Quick find/search.  Click into "Critical Update" and press the "Deactivate" link next too "PageReference getContent() and getContentAsPDF() Methods Treated as Callouts".  

If this Critical Update option no longer exists, you'll need to update to a new version.  See the upgrade procedure at: How to perform an upgrade

2. I don't want the membership number to show on the statement header

If you would rather have say "Supporter No." then:

  • On the Campaign you are running the Statements from, click into the Payment Form that you've linked to this Campaign.  Alternatively, go to the Merchant Facility Tab, click into the Merchant Facility, scroll down to the Payment Forms related list and click into the Payment Form that you'd use for your annual statements or the Payment Txn's are linked to.
  • Update the value in the field "Membership Id Label" to be what you would like - e.g. "Supporter No."

If the changing of the label is not what you are after, then you can replace the entire heading.  See How to put your company letterhead on the Receipt Template

3. What are the various Campaign Status's used for

The Campaign Members of the Campaign for will have the Status updated for the various steps.  These are:

  • Statement Generated : This is for the first step where a PDF is generated and stored against the Campaign Members related contact record
  • Statement Send: This is the status initially assigned when a request is made to send (email) the statement to the Contact.  The workflow "Send Annual Statement" is triggered by the Campaign Member Status of "Statement Send" and is the mechanism for emailing the statement.

To manually resend a statement, you could simply change the Campaign Member Status to "Send Annual Statement" and it will send it again.

4. How to I apply a letterhead to an Annual Statement but not change the general letterhead on the Merchant Facility?

Different Letterheads can be applied at the Letter level. Use the following procedure, but apply to the Notes and Attachements on the Letter record.


5. Why getting error - "PDFStatementGenerateProcessor- Apex Batch Error, Exception: System.Unexpected Exception, PHASE:EXECUTE......."?

Please check the merge fields on the letter object. 

  • The most common issue with the statement generation is merge fields are not valid. 
  • Use the letter builder/email templates to add fields to the merge text.

If you've added custom fields to the field sets, try removing those and testing again.   Please note, for field sets, you can only add fields from that Object and NOT  related object (e.g contact >FirstName).

On the statement campaign, related list campaign members. 

  • Click into a campaign member - press the annual statement button there. 
  • This might show an individual statement PDF generation error message that might be helpful.

Another item to try is removing most of the text from the receipt letter body and retrying.  NOTE: please do not remove all text, but leave a little - e.g "Hi Donor".  
If the removing of text works, use the Letter Builder to add fields back in.

6. How to change the name of the pdf. that is send?

The Pdf name is maintained in the email template that is sent along with the statement pdf.

To change PDF name

Go to Setup->Classic Email Templates-> select folder: "Payments2Us" -> search for 'Mass Annual Statement w/PDF' -> click into the Email --> press "Edit Template" button.

Scroll down to "<messaging:attachment renderAs="PDF" filename="Annual Statement {!YEAR(TODAY())}.pdf">" section and then replace the file name with your custom text.


Please note:

1. The Statement Generated will not have the new text. As this is rendered when the email is sent.

2. The Pdf sent with the email will have the new custom text you have given. To test the new wording for the pdf, you will need to press Statement Send button.

3.The fields that you can use in this template are from Contact and Campaign Member.

7. How do I change the reporting period for the Single Annual Statement?

The Pdf name is maintained in the email template that is sent along with the statement pdf.

To change PDF name

Go to Setup->Classic Email Templates-> select folder:  "Payments2Us" -> search for 'Single Annual Statement w/ PDF' -> click into the Email --> press "Edit Template" button.

Scroll down to "<c:PDFStatementComponent aid="{!recipient.accountId}" cid="{!recipient.Id}" layoutType="NONE" subject="Statement {0} - {1}" reportingPeriod="CurrentFY"/>" and adjust the reportingPeriod to either "CurrentFY" or "PreviousFY"

The Fiscal year date range is maintained in standard Salesforce setup under: setup - search "Fiscal Year" (Consult Salesforce online help for more information if needed)

8. Why are my annual statements missing details, or why is the Table of Transactions missing?

On the Letter being used for Annual Statements, make sure the following are set:

  1. Set "Body Text" to "Short".  This is needed so the text part does not take up all of the page and leaves room for the line items
  2. set "Print Line Items" to Checked. This is needed so the table of Payment Txn (payments/donations during the year)
  3. set "Primary Payment Type" to "Statement"

Now, press the "Refresh" Button (4).

Alternatively press the "Letter Builder" button (or your instance may have "Letter Builder [Beta]"), then press

9. How can I simply preview an Annual Statement after making changes?

The context of the Merge Field of Annual Statements is from the Contact Object.  This is in comparison to Receipts that are from the Payment Txn Object.

The best way to test/check is by:

  • Creating a test Annual Statement Campaign.  Make sure the "Statement Letter" is linked to  your "Letter" record.
  • Adding a single Contact to the Campaign
  • Running the Annual statement process for the initial PDF generation.  (Note, this is only required once as it saving details such as time frame etc. onto the campaign.  If doing subsequent previews, you can skip this and the above steps)
  • Click into the Campaign Member
  • Press the "Annual Statement"  button to preview.  If you cannot see this button, then make sure you have clicked on the Campaign Member and not the Contact.  If you still cannot locate, ask your Salesforce Administrator to add this button to the Page Layout.
10. Why am I not getting any line items on my statements?
  • On the Campaign for Statements, check the related Statement Letter to make sure the field "Print line items" checkbox is selected.  After Selecting, make sure you press the "Refresh" button on Campaign.
  • Make sure the criteria on the Statement Generation selection matches the Payment Txns that are related to the Contact you are checking.  In particular
    1. ONLY select the "Only Include Transactions for Selected Campaign" If the Payment Txn Campaign Matches the Campaign that you are running the Annual Statement for.  This checkbox is most relevant if you have a Campaign for regular donors and are then running the statement generation from that Campaign.  Setting this option would only include those regular Payment Txn and exclude other donations/payments that are linked to other campaigns.
    2. The Bank Deposit Date on the Payment Txn's is in the range of the From Date/To Date selection.