]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Meetings/vardefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Meetings / vardefs.php
1 <?php
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.
6  * 
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.
13  * 
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
17  * details.
18  * 
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
22  * 02110-1301 USA.
23  * 
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.
26  * 
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.
30  * 
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  ********************************************************************************/
37
38 $dictionary['Meeting'] = array('table' => 'meetings',
39         'unified_search' => true, 'full_text_search' => true, 'unified_search_default_enabled' => true,
40         'comment' => 'Meeting activities'
41                                ,'fields' => array (
42   'name' =>
43   array (
44     'name' => 'name',
45     'vname' => 'LBL_SUBJECT',
46     'required' => true,
47     'type' => 'name',
48     'dbType' => 'varchar',
49         'unified_search' => true,
50         'full_text_search' => array('boost' => 3),
51     'len' => '50',
52     'comment' => 'Meeting name',
53     'importable' => 'required',
54   ),
55   'accept_status' => array (
56     'name' => 'accept_status',
57     'vname' => 'LBL_ACCEPT_STATUS',
58     'type' => 'varchar',
59     'dbType' => 'varchar',
60     'len' => '20',
61     'source'=>'non-db',
62   ),
63   //bug 39559 
64   'set_accept_links' => array (
65     'name' => 'accept_status',
66     'vname' => 'LBL_ACCEPT_LINK',
67     'type' => 'varchar',
68     'dbType' => 'varchar',
69     'len' => '20',
70     'source'=>'non-db',
71   ),
72   'location' =>
73   array (
74     'name' => 'location',
75     'vname' => 'LBL_LOCATION',
76     'type' => 'varchar',
77     'len' => '50',
78     'comment' => 'Meeting location'
79   ),
80   'password' =>
81   array (
82     'name' => 'password',
83     'vname' => 'LBL_PASSWORD',
84     'type' => 'varchar',
85     'len' => '50',
86     'comment' => 'Meeting password',
87     'studio' => 'false',
88   ),
89   'join_url' =>
90   array (
91     'name' => 'join_url',
92     'vname' => 'LBL_URL',
93     'type' => 'varchar',
94     'len' => '200',
95     'comment' => 'Join URL',
96     'studio' => 'false',
97     'reportable' => false,
98   ),
99   'host_url' =>
100   array (
101     'name' => 'host_url',
102     'vname' => 'LBL_HOST_URL',
103     'type' => 'varchar',
104     'len' => '400',
105     'comment' => 'Host URL',
106     'studio' => 'false',
107     'reportable' => false,
108   ),
109   'displayed_url' =>
110   array (
111     'name' => 'displayed_url',
112     'vname' => 'LBL_DISPLAYED_URL',
113     'type' => 'url',
114     'len' => '400',
115     'comment' => 'Meeting URL',
116     'studio' => 'false',
117   ),
118   'creator' =>
119   array (
120     'name' => 'creator',
121     'vname' => 'LBL_CREATOR',
122     'type' => 'varchar',
123     'len' => '50',
124     'comment' => 'Meeting creator',
125     'studio' => 'false',
126   ),
127   'external_id' =>
128   array (
129     'name' => 'external_id',
130     'vname' => 'LBL_EXTERNALID',
131     'type' => 'varchar',
132     'len' => '50',
133     'comment' => 'Meeting ID for external app API',
134     'studio' => 'false',
135    ),
136   'duration_hours' =>
137   array (
138     'name' => 'duration_hours',
139     'vname' => 'LBL_DURATION_HOURS',
140     'type' => 'int',
141     'len' => '3',
142     'comment' => 'Duration (hours)',
143     'importable' => 'required',
144     'required' => true,
145   ),
146   'duration_minutes' =>
147   array (
148     'name' => 'duration_minutes',
149     'vname' => 'LBL_DURATION_MINUTES',
150     'type' => 'int',
151     'group'=>'duration_hours',
152     'len' => '2',
153     'comment' => 'Duration (minutes)'
154   ),
155   'date_start' =>
156   array (
157     'name' => 'date_start',
158     'vname' => 'LBL_DATE',
159     'type' => 'datetimecombo',
160     'dbType' => 'datetime',
161     'comment' => 'Date of start of meeting',
162     'importable' => 'required',
163     'required' => true,
164     'enable_range_search' => true,
165     'options' => 'date_range_search_dom',
166     'validation' => array('type' => 'isbefore', 'compareto' => 'date_end', 'blank' => false),
167   ),
168
169   'date_end' =>
170   array (
171     'name' => 'date_end',
172     'vname' => 'LBL_DATE_END',
173     'type' => 'datetimecombo',
174     'dbType' => 'datetime',
175     'massupdate'=>false,
176     'comment' => 'Date meeting ends',
177     'enable_range_search' => true,
178     'options' => 'date_range_search_dom',
179   ),
180   'parent_type' =>
181   array (
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',
188     'len' => 100,
189     'comment' => 'Module meeting is associated with',
190     'studio' => array('searchview'=>false),
191   ),
192   'status' =>
193   array (
194     'name' => 'status',
195     'vname' => 'LBL_STATUS',
196     'type' => 'enum',
197     'len' => 100,
198     'options' => 'meeting_status_dom',
199     'comment' => 'Meeting status (ex: Planned, Held, Not held)',
200     'default' => 'Planned',
201   ),
202   'type' =>
203    array (
204      'name' => 'type',
205      'vname' => 'LBL_TYPE',
206      'type' => 'enum',
207      'len' => 255,
208      'function' => 'getMeetingsExternalApiDropDown',
209      'comment' => 'Meeting type (ex: WebEx, Other)',
210      'options' => 'eapm_list',
211      'default'  => 'Sugar',
212      'massupdate' => false,
213          'studio' => 'false',
214    ),
215   // Bug 24170 - Added only to allow the sidequickcreate form to work correctly
216   'direction' =>
217   array (
218     'name' => 'direction',
219     'vname' => 'LBL_DIRECTION',
220     'type' => 'enum',
221     'len' => 100,
222     'options' => 'call_direction_dom',
223     'comment' => 'Indicates whether call is inbound or outbound',
224     'source' => 'non-db',
225     'importable' => 'false',
226     'massupdate'=>false,
227     'reportable'=>false,
228         'studio' => 'false',
229   ),
230   'parent_id' =>
231   array (
232     'name' => 'parent_id',
233     'vname'=>'LBL_PARENT_ID',
234     'type' => 'id',
235     'group'=>'parent_name',
236     'reportable'=>false,
237     'comment' => 'ID of item indicated by parent_type',
238     'studio' => array('searchview'=>false),
239   ),
240   'reminder_checked' => array(
241     'name' => 'reminder_checked',
242     'vname' => 'LBL_REMINDER',
243     'type' => 'bool',
244     'source' => 'non-db',
245     'comment' => 'checkbox indicating whether or not the reminder value is set (Meta-data only)',
246     'massupdate' => false,
247    ),
248   'reminder_time' =>
249   array (
250     'name' => 'reminder_time',
251     'vname' => 'LBL_REMINDER_TIME',
252     'type' => 'enum',
253     'dbType' => 'int',
254     'options' => 'reminder_time_options',
255     'reportable' => false,
256     'massupdate' => false,
257     'default'=> -1,
258     'comment' => 'Specifies when a reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
259   ),  
260   'email_reminder_checked' => array(
261     'name' => 'email_reminder_checked',
262     'vname' => 'LBL_EMAIL_REMINDER',
263     'type' => 'bool',
264     'source' => 'non-db',
265     'comment' => 'checkbox indicating whether or not the email reminder value is set (Meta-data only)',
266     'massupdate' => false,
267    ),  
268   'email_reminder_time' =>
269   array (
270     'name' => 'email_reminder_time',
271     'vname' => 'LBL_EMAIL_REMINDER_TIME',
272     'type' => 'enum',
273     'dbType' => 'int',
274     'options' => 'reminder_time_options',
275     'reportable' => false,
276     'massupdate' => false,
277     'default'=> -1,
278     'comment' => 'Specifies when a email reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
279   ),  
280   'email_reminder_sent' => array( 
281     'name' => 'email_reminder_sent',
282     'vname' => 'LBL_EMAIL_REMINDER_SENT',
283     'default' => 0,
284     'type' => 'bool',
285     'comment' => 'Whether email reminder is already sent',
286     'studio' => false,
287     'massupdate'=> false,
288    ), 
289    'outlook_id' =>
290   array (
291     'name' => 'outlook_id',
292     'vname' => 'LBL_OUTLOOK_ID',
293     'type' => 'varchar',
294     'len' => '255',
295     'reportable' => false,
296     'comment' => 'When the Sugar Plug-in for Microsoft Outlook syncs an Outlook appointment, this is the Outlook appointment item ID'
297   ),
298    'sequence' =>
299   array (
300     'name' => 'sequence',
301     'vname' => 'LBL_SEQUENCE',
302     'type' => 'int',
303     'len' => '11',
304     'reportable' => false,
305     'default'=>0,
306     'comment' => 'Meeting update sequence for meetings as per iCalendar standards',
307   ),
308
309   'contact_name' =>
310   array (
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',
317     'type' => 'relate',
318     'link'=>'contacts',
319     'table' => 'contacts',
320     'isnull' => 'true',
321     'module' => 'Contacts',
322     'join_name' => 'contacts',
323     'dbType' => 'varchar',
324     'source'=>'non-db',
325     'len' => 36,
326         'studio' => 'false',
327         ),
328
329   'contacts' =>
330   array (
331         'name' => 'contacts',
332     'type' => 'link',
333     'relationship' => 'meetings_contacts',
334     'source'=>'non-db',
335                 'vname'=>'LBL_CONTACTS',
336   ),
337    'parent_name'=>
338         array(
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',
344                 'type'=>'parent',
345                 'group'=>'parent_name',
346                 'source'=>'non-db',
347                 'options'=> 'parent_type_display',
348                 ),
349   'users' =>
350   array (
351         'name' => 'users',
352     'type' => 'link',
353     'relationship' => 'meetings_users',
354     'source'=>'non-db',
355                 'vname'=>'LBL_USERS',
356   ),
357   'accounts' =>
358   array (
359         'name' => 'accounts',
360     'type' => 'link',
361     'relationship' => 'account_meetings',
362     'source'=>'non-db',
363                 'vname'=>'LBL_ACCOUNT',
364   ),
365   'leads' =>
366   array (
367     'name' => 'leads',
368     'type' => 'link',
369     'relationship' => 'meetings_leads',
370     'source'=>'non-db',
371         'vname'=>'LBL_LEADS',
372   ),
373   'opportunity' =>
374   array (
375         'name' => 'opportunity',
376     'type' => 'link',
377     'relationship' => 'opportunity_meetings',
378     'source'=>'non-db',
379                 'vname'=>'LBL_OPPORTUNITY',
380   ),
381   'case' =>
382   array (
383         'name' => 'case',
384     'type' => 'link',
385     'relationship' => 'case_meetings',
386     'source'=>'non-db',
387                 'vname'=>'LBL_CASE',
388   ),
389     'notes' =>
390   array (
391         'name' => 'notes',
392     'type' => 'link',
393     'relationship' => 'meetings_notes',
394     'module'=>'Notes',
395     'bean_name'=>'Note',
396     'source'=>'non-db',
397                 'vname'=>'LBL_NOTES',
398   ),
399         'contact_id' => array(
400                 'name' => 'contact_id',
401                 'type' => 'id',
402                 'source' => 'non-db',
403         ),
404         'repeat_type' =>
405         array(
406                 'name' => 'repeat_type',
407                 'vname' => 'LBL_REPEAT_TYPE',
408                 'type' => 'enum',
409                 'len' => 36,
410                 'options' => 'repeat_type_dom',
411                 'comment' => 'Type of recurrence',
412                 'importable' => 'false',
413                 'massupdate' => false,
414                 'reportable' => false,
415                 'studio' => 'false',
416         ),      
417         'repeat_interval' =>
418         array(
419                 'name' => 'repeat_interval',
420                 'vname' => 'LBL_REPEAT_INTERVAL',
421                 'type' => 'int',
422                 'len' => 3,
423                 'default' => 1,
424                 'comment' => 'Interval of recurrence',
425                 'importable' => 'false',
426                 'massupdate' => false,
427                 'reportable' => false,
428                 'studio' => 'false',
429         ),      
430         'repeat_dow' =>
431         array(
432                 'name' => 'repeat_dow',
433                 'vname' => 'LBL_REPEAT_DOW',
434                 'type' => 'varchar',
435                 'len' => 7,
436                 'comment' => 'Days of week in recurrence',
437                 'importable' => 'false',
438                 'massupdate' => false,
439                 'reportable' => false,
440                 'studio' => 'false',
441         ),      
442         'repeat_until' =>
443         array(
444                 'name' => 'repeat_until',
445                 'vname' => 'LBL_REPEAT_UNTIL',
446                 'type' => 'date',
447                 'comment' => 'Repeat until specified date',
448                 'importable' => 'false',
449                 'massupdate' => false,
450                 'reportable' => false,
451                 'studio' => 'false',
452         ),      
453         'repeat_count' =>
454         array(
455                 'name' => 'repeat_count',
456                 'vname' => 'LBL_REPEAT_COUNT',
457                 'type' => 'int',
458                 'len' => 7,
459                 'comment' => 'Number of recurrence',
460                 'importable' => 'false',
461                 'massupdate' => false,
462                 'reportable' => false,
463                 'studio' => 'false',
464         ),
465         'repeat_parent_id' =>
466         array(
467                 'name' => 'repeat_parent_id',
468                 'vname' => 'LBL_REPEAT_PARENT_ID',
469                 'type' => 'id',
470                 'len' => 36,
471                 'comment' => 'Id of the first element of recurring records',
472                 'importable' => 'false',
473                 'massupdate' => false,
474                 'reportable' => false,
475                 'studio' => 'false',
476         ),
477         'recurring_source' =>
478         array(
479                 'name' => 'recurring_source',
480                 'vname' => 'LBL_RECURRING_SOURCE',
481                 'type' => 'varchar',
482                 'len' => 36,
483                 'comment' => 'Source of recurring meeting',
484                 'importable' => false,
485                 'massupdate' => false,
486                 'reportable' => false,
487                 'studio' => false,
488         ),
489         'duration' =>
490         array(
491                 'name' => 'duration',
492                 'vname' => 'LBL_DURATION',
493                 'type' => 'enum',
494                 'options' => 'duration_dom',
495                 'source' => 'non-db',
496                 'comment' => 'Duration handler dropdown',
497                 'massupdate' => false,
498                 'reportable' => false,
499                 'importable' => false,
500         ),
501 ),
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')
507
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')
512
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')
517
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')
522         )
523
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')),
529
530                                                    )
531 //This enables optimistic locking for Saves From EditView
532         ,'optimistic_locking'=>true,
533                             );
534
535 VardefManager::createVardef('Meetings','Meeting', array('default', 'assignable',
536 ));
537 ?>