2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
38 $dictionary['EmailTemplate'] = array(
39 'table' => 'email_templates', 'comment' => 'Templates used in email processing',
43 'vname' => 'LBL_NAME',
47 'comment' => 'Unique identifier'
49 'date_entered' => array(
50 'name' => 'date_entered',
51 'vname' => 'LBL_DATE_ENTERED',
54 'comment' => 'Date record created'
56 'date_modified' => array(
57 'name' => 'date_modified',
58 'vname' => 'LBL_DATE_MODIFIED',
61 'comment' => 'Date record last modified'
63 'modified_user_id' => array(
64 'name' => 'modified_user_id',
65 'rname' => 'user_name',
66 'id_name' => 'modified_user_id',
67 'vname' => 'LBL_ASSIGNED_TO',
68 'type' => 'assigned_user_name',
73 'comment' => 'User who last modified record'
75 'created_by' => array(
76 'name' => 'created_by',
77 'vname' => 'LBL_CREATED_BY',
80 'comment' => 'User who created record'
83 'name' => 'published',
84 'vname' => 'LBL_PUBLISHED',
91 'vname' => 'LBL_NAME',
94 'comment' => 'Email template name',
95 'importable' => 'required',
98 'description' => array(
99 'name' => 'description',
100 'vname' => 'LBL_DESCRIPTION',
102 'comment' => 'Email template description'
106 'vname' => 'LBL_SUBJECT',
109 'comment' => 'Email subject to be used in resulting email'
113 'vname' => 'LBL_BODY',
115 'comment' => 'Plain text body to be used in resulting email'
117 'body_html' => array(
118 'name' => 'body_html',
119 'vname' => 'LBL_PLAIN_TEXT',
121 'comment' => 'HTML formatted email body to be used in resulting email'
125 'vname' => 'LBL_DELETED',
129 'comment' => 'Record deletion indicator'
131 'assigned_user_id' => array (
132 'name' => 'assigned_user_id',
133 'rname' => 'user_name',
134 'id_name' => 'assigned_user_id',
135 'vname' => 'LBL_ASSIGNED_TO_ID',
136 'group'=>'assigned_user_name',
144 'comment' => 'User ID assigned to record',
145 'duplicate_merge'=>'disabled'
147 'assigned_user_name' => array (
148 'name' => 'assigned_user_name',
149 'link'=>'assigned_user_link' ,
150 'vname' => 'LBL_ASSIGNED_TO_NAME',
151 'rname' => 'user_name',
156 'id_name' => 'assigned_user_id',
158 'duplicate_merge'=>'disabled'
160 'assigned_user_link' => array (
161 'name' => 'assigned_user_link',
163 'relationship' => 'emailtemplates_assigned_user',
164 'vname' => 'LBL_ASSIGNED_TO_USER',
165 'link_type' => 'one',
169 'duplicate_merge'=>'enabled',
170 'rname' => 'user_name',
171 'id_name' => 'assigned_user_id',
174 'text_only' => array(
175 'name' => 'text_only',
176 'vname' => 'LBL_TEXT_ONLY',
180 'comment' => 'Should be checked if email template is to be sent in text only'
185 'name' => 'email_templatespk',
187 'fields'=>array('id')
190 'name' => 'idx_email_template_name',
192 'fields'=>array('name')
195 'relationships' => array(
196 'emailtemplates_assigned_user' =>
197 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
198 'rhs_module'=> 'EmailTemplates' , 'rhs_table'=> 'email_templates', 'rhs_key' => 'assigned_user_id',
199 'relationship_type'=>'one-to-many')
203 VardefManager::createVardef('EmailTemplates','EmailTemplate', array(