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-2012 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, 'full_text_search' => true, 'unified_search_default_enabled' => true,
40 'comment' => 'Meeting activities'
45 'vname' => 'LBL_SUBJECT',
48 'dbType' => 'varchar',
49 'unified_search' => true,
50 'full_text_search' => array('boost' => 3),
52 'comment' => 'Meeting name',
53 'importable' => 'required',
55 'accept_status' => array (
56 'name' => 'accept_status',
57 'vname' => 'LBL_ACCEPT_STATUS',
59 'dbType' => 'varchar',
64 'set_accept_links' => array (
65 'name' => 'accept_status',
66 'vname' => 'LBL_ACCEPT_LINK',
68 'dbType' => 'varchar',
75 'vname' => 'LBL_LOCATION',
78 'comment' => 'Meeting location'
83 'vname' => 'LBL_PASSWORD',
86 'comment' => 'Meeting password',
95 'comment' => 'Join URL',
97 'reportable' => false,
101 'name' => 'host_url',
102 'vname' => 'LBL_HOST_URL',
105 'comment' => 'Host URL',
107 'reportable' => false,
111 'name' => 'displayed_url',
112 'vname' => 'LBL_DISPLAYED_URL',
115 'comment' => 'Meeting URL',
121 'vname' => 'LBL_CREATOR',
124 'comment' => 'Meeting creator',
129 'name' => 'external_id',
130 'vname' => 'LBL_EXTERNALID',
133 'comment' => 'Meeting ID for external app API',
138 'name' => 'duration_hours',
139 'vname' => 'LBL_DURATION_HOURS',
142 'comment' => 'Duration (hours)',
143 'importable' => 'required',
146 'duration_minutes' =>
148 'name' => 'duration_minutes',
149 'vname' => 'LBL_DURATION_MINUTES',
151 'group'=>'duration_hours',
153 'comment' => 'Duration (minutes)'
157 'name' => 'date_start',
158 'vname' => 'LBL_DATE',
159 'type' => 'datetimecombo',
160 'dbType' => 'datetime',
161 'comment' => 'Date of start of meeting',
162 'importable' => 'required',
164 'enable_range_search' => true,
165 'options' => 'date_range_search_dom',
166 'validation' => array('type' => 'isbefore', 'compareto' => 'date_end', 'blank' => false),
171 'name' => 'date_end',
172 'vname' => 'LBL_DATE_END',
173 'type' => 'datetimecombo',
174 'dbType' => 'datetime',
176 'comment' => 'Date meeting ends',
177 'enable_range_search' => true,
178 'options' => 'date_range_search_dom',
182 'name' => 'parent_type',
183 'vname'=>'LBL_PARENT_TYPE',
184 'type' =>'parent_type',
185 'dbType' => 'varchar',
186 'group'=>'parent_name',
187 'options'=> 'parent_type_display',
189 'comment' => 'Module meeting is associated with',
190 'studio' => array('searchview'=>false),
195 'vname' => 'LBL_STATUS',
198 'options' => 'meeting_status_dom',
199 'comment' => 'Meeting status (ex: Planned, Held, Not held)',
200 'default' => 'Planned',
205 'vname' => 'LBL_TYPE',
208 'function' => 'getMeetingsExternalApiDropDown',
209 'comment' => 'Meeting type (ex: WebEx, Other)',
210 'options' => 'eapm_list',
211 'default' => 'Sugar',
212 'massupdate' => false,
215 // Bug 24170 - Added only to allow the sidequickcreate form to work correctly
218 'name' => 'direction',
219 'vname' => 'LBL_DIRECTION',
222 'options' => 'call_direction_dom',
223 'comment' => 'Indicates whether call is inbound or outbound',
224 'source' => 'non-db',
225 'importable' => 'false',
232 'name' => 'parent_id',
233 'vname'=>'LBL_PARENT_ID',
235 'group'=>'parent_name',
237 'comment' => 'ID of item indicated by parent_type',
238 'studio' => array('searchview'=>false),
240 'reminder_checked' => array(
241 'name' => 'reminder_checked',
242 'vname' => 'LBL_REMINDER',
244 'source' => 'non-db',
245 'comment' => 'checkbox indicating whether or not the reminder value is set (Meta-data only)',
246 'massupdate' => false,
250 'name' => 'reminder_time',
251 'vname' => 'LBL_REMINDER_TIME',
254 'options' => 'reminder_time_options',
255 'reportable' => false,
256 'massupdate' => false,
258 'comment' => 'Specifies when a reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
260 'email_reminder_checked' => array(
261 'name' => 'email_reminder_checked',
262 'vname' => 'LBL_EMAIL_REMINDER',
264 'source' => 'non-db',
265 'comment' => 'checkbox indicating whether or not the email reminder value is set (Meta-data only)',
266 'massupdate' => false,
268 'email_reminder_time' =>
270 'name' => 'email_reminder_time',
271 'vname' => 'LBL_EMAIL_REMINDER_TIME',
274 'options' => 'reminder_time_options',
275 'reportable' => false,
276 'massupdate' => false,
278 'comment' => 'Specifies when a email reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
280 'email_reminder_sent' => array(
281 'name' => 'email_reminder_sent',
282 'vname' => 'LBL_EMAIL_REMINDER_SENT',
285 'comment' => 'Whether email reminder is already sent',
287 'massupdate'=> false,
291 'name' => 'outlook_id',
292 'vname' => 'LBL_OUTLOOK_ID',
295 'reportable' => false,
296 'comment' => 'When the Sugar Plug-in for Microsoft Outlook syncs an Outlook appointment, this is the Outlook appointment item ID'
300 'name' => 'sequence',
301 'vname' => 'LBL_SEQUENCE',
304 'reportable' => false,
306 'comment' => 'Meeting update sequence for meetings as per iCalendar standards',
311 'name' => 'contact_name',
312 'rname' => 'last_name',
313 'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
314 'id_name' => 'contact_id',
315 'massupdate' => false,
316 'vname' => 'LBL_CONTACT_NAME',
319 'table' => 'contacts',
321 'module' => 'Contacts',
322 'join_name' => 'contacts',
323 'dbType' => 'varchar',
331 'name' => 'contacts',
333 'relationship' => 'meetings_contacts',
335 'vname'=>'LBL_CONTACTS',
339 'name'=> 'parent_name',
340 'parent_type'=>'record_type_display' ,
341 'type_name'=>'parent_type',
342 'id_name'=>'parent_id',
343 'vname'=>'LBL_LIST_RELATED_TO',
345 'group'=>'parent_name',
347 'options'=> 'parent_type_display',
353 'relationship' => 'meetings_users',
355 'vname'=>'LBL_USERS',
359 'name' => 'accounts',
361 'relationship' => 'account_meetings',
363 'vname'=>'LBL_ACCOUNT',
369 'relationship' => 'meetings_leads',
371 'vname'=>'LBL_LEADS',
375 'name' => 'opportunity',
377 'relationship' => 'opportunity_meetings',
379 'vname'=>'LBL_OPPORTUNITY',
385 'relationship' => 'case_meetings',
393 'relationship' => 'meetings_notes',
397 'vname'=>'LBL_NOTES',
399 'contact_id' => array(
400 'name' => 'contact_id',
402 'source' => 'non-db',
406 'name' => 'repeat_type',
407 'vname' => 'LBL_REPEAT_TYPE',
410 'options' => 'repeat_type_dom',
411 'comment' => 'Type of recurrence',
412 'importable' => 'false',
413 'massupdate' => false,
414 'reportable' => false,
419 'name' => 'repeat_interval',
420 'vname' => 'LBL_REPEAT_INTERVAL',
424 'comment' => 'Interval of recurrence',
425 'importable' => 'false',
426 'massupdate' => false,
427 'reportable' => false,
432 'name' => 'repeat_dow',
433 'vname' => 'LBL_REPEAT_DOW',
436 'comment' => 'Days of week in recurrence',
437 'importable' => 'false',
438 'massupdate' => false,
439 'reportable' => false,
444 'name' => 'repeat_until',
445 'vname' => 'LBL_REPEAT_UNTIL',
447 'comment' => 'Repeat until specified date',
448 'importable' => 'false',
449 'massupdate' => false,
450 'reportable' => false,
455 'name' => 'repeat_count',
456 'vname' => 'LBL_REPEAT_COUNT',
459 'comment' => 'Number of recurrence',
460 'importable' => 'false',
461 'massupdate' => false,
462 'reportable' => false,
465 'repeat_parent_id' =>
467 'name' => 'repeat_parent_id',
468 'vname' => 'LBL_REPEAT_PARENT_ID',
471 'comment' => 'Id of the first element of recurring records',
472 'importable' => 'false',
473 'massupdate' => false,
474 'reportable' => false,
477 'recurring_source' =>
479 'name' => 'recurring_source',
480 'vname' => 'LBL_RECURRING_SOURCE',
483 'comment' => 'Source of recurring meeting',
484 'importable' => false,
485 'massupdate' => false,
486 'reportable' => false,
491 'name' => 'duration',
492 'vname' => 'LBL_DURATION',
494 'options' => 'duration_dom',
495 'source' => 'non-db',
496 'comment' => 'Duration handler dropdown',
497 'massupdate' => false,
498 'reportable' => false,
499 'importable' => false,
502 'relationships' => array (
503 'meetings_assigned_user' =>
504 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
505 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'assigned_user_id',
506 'relationship_type'=>'one-to-many')
508 ,'meetings_modified_user' =>
509 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
510 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'modified_user_id',
511 'relationship_type'=>'one-to-many')
513 ,'meetings_created_by' =>
514 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
515 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'created_by',
516 'relationship_type'=>'one-to-many')
518 ,'meetings_notes' => array('lhs_module'=> 'Meetings', 'lhs_table'=> 'meetings', 'lhs_key' => 'id',
519 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
520 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
521 'relationship_role_column_value'=>'Meetings')
524 , 'indices' => array (
525 array('name' =>'idx_mtg_name', 'type'=>'index', 'fields'=>array('name')),
526 array('name' =>'idx_meet_par_del', 'type'=>'index', 'fields'=>array('parent_id','parent_type','deleted')),
527 array('name' => 'idx_meet_stat_del', 'type' => 'index', 'fields'=> array('assigned_user_id', 'status', 'deleted')),
528 array('name' => 'idx_meet_date_start', 'type' => 'index', 'fields'=> array('date_start')),
531 //This enables optimistic locking for Saves From EditView
532 ,'optimistic_locking'=>true,
535 VardefManager::createVardef('Meetings','Meeting', array('default', 'assignable',