You may find in some cases that contents in your Apttus Temporary Email Templates folder contain sensitive contractual data as attachments to offline agreements. To remedy this, you can use the following APEX job and associated Comply System Property to clean up temporary email templates that are older than a configured period. When this job runs it checks for all temporary email templates older than the period configured by the new Comply System Property and deletes them.

Step 1: Configure APEX Scheduler Job

Schedule a new job using the Apex Scheduler using the standard Salesforce process.

  1. From Setup, enter "Apex Classes" into the Quick Find box, select Apex classes, and click the Schedule Apex button.
  2. Enter a Job Name and click the lookup button to choose CleanupJobScheduler as the Apex Class.
  3. Choose the job Frequency and other execution options for the class.
  4. Click Save.

Step 2: Configure Comply System Property

Use the Temp Email Template Inactive Hours Comply System Property to set the orphan period of temporary email templates to use in conjunction with the CleanupJobScheduler APEX class. The default value of this property is set to 4 hours.

  1. Navigate to Setup > Develop > Custom Settings.
  2. Click Manage next to Comply System Properties.
  3. Click Edit.
  4. Specify a value for the property Temp Email Template Inactive Hours. This sets the number of hours after which a temporary email template is considered inactive. When the CleanupJobScheduler job runs (Step 1), any temporary email templates which are older will be deleted.
  5. Click Save.

Note: You cannot set this property value to zero (0) as it will interfere with the execution of your email templates. Please set the property to 1 or higher if you intend to configure temporary email cleanup.