Task Templates Component Doco

What is this component and why did we build it?

Task Templates is a component which allows for predefined Activity Template Groups (Tasks or Events), to be associated with an Salesforce Object (Account, Contact, etc...). This data is stored as a Custom MetadataTypes in the org. The Task or Event records do not exist until they are created by the component. The design file allows for the visibility of Activity Template Groups only associated with the Object where the component is placed, or Activity Templates Groups for all the Objects in the org. There are three Custom Metadata Types required for this component: Template Lookup, Task Template, and Event Template. This component was built to allow quick creation of multiple predefined Tasks and or Events without the need to create them manually. 

Template Lookup:

Template Lookup represents a group of Tasks and or Events to be associated with an Object. Template Lookup can be thought of as the parent object which contains a group of Tasks or Events. Important fields for the Template Lookup Custom Metadata Type are below:

  • Label: Label of the Template Lookup. This is the value that will appear when associating a Task or Event below to the Template Lookup. 
  • Target Object: The Object (Account, Contact, etc...) the tasks or events will be related to. 
  • Template Id: The template name. This will be the name displayed in the component select list of available Activity Template Groups. 

Task Template and Event Template:

Create a Task Template or Event Template Custom Metadata Type to represent a future Task or Event to be created by the component. Important field for the Task Template and Event Template Custom Metadata Type are:

  • Template Lookup: This is a lookup field which contains the Label of the Template Lookup. This is the field which associates the Task or Event Custom Metadata Type data with a Template Lookup Metadata Type which was discussed above. Any number of Tasks or Events may be associated with a single Template Lookup. 
  • Days Until Scheduled: This is a number which represents the days from the time of Task or Event creation until the ActivityDate of the Task or Event. If this field is left blank or contains text which cannot be converted to a number then the system defaults to 14 days. 
  • Leave Blank: These are for the Event Template and represent the meeting StartTime and EndTime. These are current fix and set in the system, so these should be left blank. If values are entered here, it has no functional impact. 

The remaining fields for these two Metadata Types are standard Task or Event fields. These fields contain the future field values which will be used to create the Tasks or Events when the are created by the component. 

To Use the component:

Place the Task Template component on the page. 



If the design file is selected to This Object Only, Then the only available templates are the ones designated for the Account Object. 



If the design file is selected to All Objects then all of the org Templates are available.

You may select any of the templates available. I will select the Account: Meeting templates. As you can see, there is a meeting and account associated with this template. It is important to note that what is seen here is metadata only and is not an actual record. In order to create the actual records, you must press Create from Template. 




After pressing the Create from Template button, the task and event is created and associated with the record. 



This document references this ticket:  ONEPLACE-1094 - Getting issue details... STATUS  and  ONEPLACE-1143 - Getting issue details... STATUS