Overview

This page explains how to create your own custom email and print templates and use them during the Sales Order Process (SOP).

The table below shows all our new Sales Order Processing email and print templates - click a link to see a code sample.

Assumptions

We assume that your org has all SOP packages installed. For further information, see our FinancialForce Sales Orders documentation.

Process

  1. Create new components
  2. Create new pages
  3. Create new email templates
  4. Enable new templates
  5. Create new print button

Sales Order templates

My Sales Order With Attachment
Component Template Print Template Email Template
MySalesOrderDetail.component mysalesorderpdf.page MySalesOrderWithAttachment.email
 
My Service Order With Attachment
Component Template Print Template Email Template
MyServiceOrder.component myserviceorderpdf.page MyServiceOrderWithAttachment.email
 
My Service Order Detail With Attachment
Component Template Print Template Email Template
MyServiceOrderDetail.component myserviceorderdetailpdf.page MyServiceOrderDetailWithAttachment.email
 
My Renewal Contract Order With Attachment
Component Template Print Template Email Template
MyRenewalContractOrder.component myrenewalcontractorderpdf.page MyRenewalContractorOrderWithAttachment.email

Create new components

  1. Click the Component Template column link.
  2. Copy the text to the clipboard.
  3. Login into your org.
  4. Go to Setup | Develop | Components and click New.
  5. Paste the component.
  6. Click Save.

Repeat these steps for each component.

Create new pages

  1. Click the Print Template column link.
  2. Copy the code to the clipboard.
  3. Login into your org.
  4. Go to Setup | Develop | Pages and click New.
  5. Paste the page.
  6. Click Save.

Repeat these steps for each page.

Create new email templates

  1. Click the Email Template column link.
  2. Copy the code to your clipboard.
  3. Login into your org.
  4. Go to Setup | Email | My Templates and click New Template.
    1. Select the Visualforce option and click Next.
    2. Select the Sales Order Email Templates folder.
    3. The Name should be the same as the one that we find in the Template Name column.
    4. Remove all underscore characters in the Template Unique Name field.
    5. Click Available For use check box.
    6. Set a value in the Email Subject field.
    7. Select a value for the Recipient Type picklist.
    8. Click Save.
    9. Click Edit Template.
    10. Paste from the clipboard and click Save.

Repeat these steps for each email template.

Enable new templates

  1. Click the Sales Order QuickStart tab.
  2. Click the Sales Order Help link.
  3. Navigate to the Managing Custom Settings topic and follow the steps described, but using the names specified in the previous table.
  4. To direct the Print and Email buttons to your custom templates:
    1. Go to Setup | Develop | Custom Settings and click the Manage link next to Sales Order Settings.
    2. Click New.
    3. Print Template field: Go to Print Template column in the previous table and use one of them. Remove the ".page" extension.
    4. Email Template field: Go to Template Name column in the previous table and use the one that is related with the page that you have just set.
    5. Click Save.

To update these values, click Edit and change the Email Template and Print Template fields.

Create new Print button

  1. Go to Setup | Create | Objects and select Sales Order object.
  2. Click Custom Buttons and Links.
  3. Click New.
  4. Enter a value for Label field, such as IE.My Print.
  5. Remove all underscore characters from the value in the Name field.
  6. Select Detail Page Button for Display Type field.
  7. Select Display in existing window with sidebar for Behavior field.
  8. Select Visualforce Page in the Content Source field. A new field, Content, is displayed.
  9. Select the page that you want to see when you click the new button.

To update this value, click Edit and change the page in the Content field.