2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM 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['Meeting'] = array('table' => 'meetings',
39 'unified_search' => true,
40 'comment' => 'Meeting activities'
45 'vname' => 'LBL_SUBJECT',
48 'dbType' => 'varchar',
49 'unified_search' => true,
51 'comment' => 'Meeting name',
52 'importable' => 'required',
54 'accept_status' => array (
55 'name' => 'accept_status',
56 'vname' => 'LBL_SUBJECT',
58 'dbType' => 'varchar',
65 'vname' => 'LBL_LOCATION',
68 'comment' => 'Meeting location'
72 'name' => 'duration_hours',
73 'vname' => 'LBL_DURATION_HOURS',
76 'comment' => 'Duration (hours)',
77 'importable' => 'required',
82 'name' => 'duration_minutes',
83 'vname' => 'LBL_DURATION_MINUTES',
85 'group'=>'duration_hours',
86 'function' => array('name'=>'getDurationMinutesOptions', 'returns'=>'html', 'include'=>'modules/Calls/CallHelper.php'),
88 'comment' => 'Duration (minutes)'
92 'name' => 'date_start',
93 'vname' => 'LBL_DATE',
94 'type' => 'datetimecombo',
95 'dbType' => 'datetime',
96 'comment' => 'Date of start of meeting',
97 'importable' => 'required',
103 'name' => 'date_end',
104 'vname' => 'LBL_DATE_END',
107 'comment' => 'Date meeting ends'
111 'name' => 'parent_type',
112 'vname'=>'LBL_LIST_RELATED_TO',
113 'type' =>'parent_type',
114 'dbType' => 'varchar',
115 'group'=>'parent_name',
117 'comment' => 'Module meeting is associated with'
122 'vname' => 'LBL_STATUS',
125 'options' => 'meeting_status_dom',
126 'comment' => 'Meeting status (ex: Planned, Held, Not held)'
128 // Bug 24170 - Added only to allow the sidequickcreate form to work correctly
131 'name' => 'direction',
132 'vname' => 'LBL_DIRECTION',
135 'options' => 'call_direction_dom',
136 'comment' => 'Indicates whether call is inbound or outbound',
137 'source' => 'non-db',
138 'importable' => 'false',
145 'name' => 'parent_id',
146 'vname'=>'LBL_LIST_RELATED_TO',
148 'group'=>'parent_name',
150 'comment' => 'ID of item indicated by parent_type'
152 'reminder_checked'=>array(
153 'name' => 'reminder_checked',
154 'vname' => 'LBL_REMINDER',
156 'source' => 'non-db',
157 'comment' => 'checkbox indicating whether or not the reminder value is set (Meta-data only)',
163 'name' => 'reminder_time',
164 'vname' => 'LBL_REMINDER_TIME',
166 'function' => array('name'=>'getReminderTime', 'returns'=>'html', 'include'=>'modules/Calls/CallHelper.php', 'onListView'=>true ),
167 'reportable' => false,
169 'comment' => 'Specifies when a reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
173 'name' => 'outlook_id',
174 'vname' => 'LBL_OUTLOOK_ID',
177 'reportable' => false,
178 'comment' => 'When the Sugar Plug-in for Microsoft Outlook syncs an Outlook appointment, this is the Outlook appointment item ID'
183 'name' => 'contact_name',
184 'rname' => 'last_name',
185 'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
186 'id_name' => 'contact_id',
187 'massupdate' => false,
188 'vname' => 'LBL_CONTACT_NAME',
191 'table' => 'contacts',
193 'module' => 'Contacts',
194 'join_name' => 'contacts',
195 'dbType' => 'varchar',
203 'name' => 'contacts',
205 'relationship' => 'meetings_contacts',
207 'vname'=>'LBL_CONTACTS',
211 'name'=> 'parent_name',
212 'parent_type'=>'record_type_display' ,
213 'type_name'=>'parent_type',
214 'id_name'=>'parent_id',
215 'vname'=>'LBL_LIST_RELATED_TO',
217 'group'=>'parent_name',
219 'options'=> 'parent_type_display',
225 'relationship' => 'meetings_users',
227 'vname'=>'LBL_USERS',
231 'name' => 'accounts',
233 'relationship' => 'account_meetings',
235 'vname'=>'LBL_ACCOUNT',
241 'relationship' => 'meetings_leads',
243 'vname'=>'LBL_LEADS',
247 'name' => 'opportunity',
249 'relationship' => 'opportunity_meetings',
251 'vname'=>'LBL_OPPORTUNITY',
257 'relationship' => 'case_meetings',
265 'relationship' => 'meetings_notes',
269 'vname'=>'LBL_NOTES',
271 'contact_id' => array(
272 'name' => 'contact_id',
274 'source' => 'non-db',
277 'relationships' => array (
278 'meetings_assigned_user' =>
279 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
280 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'assigned_user_id',
281 'relationship_type'=>'one-to-many')
283 ,'meetings_modified_user' =>
284 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
285 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'modified_user_id',
286 'relationship_type'=>'one-to-many')
288 ,'meetings_created_by' =>
289 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
290 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'created_by',
291 'relationship_type'=>'one-to-many')
293 ,'meetings_notes' => array('lhs_module'=> 'Meetings', 'lhs_table'=> 'meetings', 'lhs_key' => 'id',
294 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
295 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
296 'relationship_role_column_value'=>'Meetings')
299 , 'indices' => array (
300 array('name' =>'idx_mtg_name', 'type'=>'index', 'fields'=>array('name')),
301 array('name' =>'idx_meet_par_del', 'type'=>'index', 'fields'=>array('parent_id','parent_type','deleted')),
302 array('name' => 'idx_meet_stat_del', 'type' => 'index', 'fields'=> array('assigned_user_id', 'status', 'deleted')),
305 //This enables optimistic locking for Saves From EditView
306 ,'optimistic_locking'=>true,
309 VardefManager::createVardef('Meetings','Meeting', array('default', 'assignable',