Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Default template

Subscription25 provides you want a standard layout which has limited customisation options. For now, you can:

  • Upload your logo in the administration

  • Upload your footer image in the administration

  • Change the terms and condition URL

The layout of the default template is as follows:

...

Image Added

Custom template

To create a custom Invoice Layout you need to create a visualforce page that is rendered as a PDF. This page needs to have the Subscription25 Invoice object as it standardController. You can extend this with a custom class to get additional functionalities in the pdf.

Code Block
<apex:page standardController="Subscription25__Invoice__c" renderAs="pdf" sidebar="false" showHeader="false" applyBodyTag="false">
  Invoice Date: {!Subscription25__Invoice__c.Subscription25__Invoice_Date__c}  
  etc..
</apex:page>

To use this template you must create an “Invoice template record” in Subscription25 and assign it to the administrations in which you want to use this template. This allows you to create different layouts for different administrations.

Image Modified
  • The Name of the Invoice Layout is your reference to this record.

  • The page name is the API name of your VisualforcePage. Don’t forget to add the c__ before the name.

  • One record can be the fallback record which will be used if there is no layout assigned to the administration.

Info

It is important to start the Page name with c__ to indicate to Salesforce that this is a custom namespace visualforce page. The full name of the item will be c__<VisualForceApiName>.

On your administration, you should have a related list called Administration Invoice Layouts in which you should create a record to link this template to that administration.

Image Modified

On this page:

Table of Contents