]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Meetings/vardefs.php
Release 6.5.8
[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     'group'=>'duration',
142     'len' => '3',
143     'comment' => 'Duration (hours)',
144     'importable' => 'required',
145     'required' => true,
146     'studio' => 'false',
147   ),
148   'duration_minutes' =>
149   array (
150     'name' => 'duration_minutes',
151     'vname' => 'LBL_DURATION_MINUTES',
152     'type' => 'int',
153     'group'=>'duration',
154     'len' => '2',
155     'comment' => 'Duration (minutes)',
156     'studio' => 'false',
157   ),
158   'date_start' =>
159   array (
160     'name' => 'date_start',
161     'vname' => 'LBL_DATE',
162     'type' => 'datetimecombo',
163     'dbType' => 'datetime',
164     'comment' => 'Date of start of meeting',
165     'importable' => 'required',
166     'required' => true,
167     'enable_range_search' => true,
168     'options' => 'date_range_search_dom',
169     'validation' => array('type' => 'isbefore', 'compareto' => 'date_end', 'blank' => false),
170   ),
171
172   'date_end' =>
173   array (
174     'name' => 'date_end',
175     'vname' => 'LBL_DATE_END',
176     'type' => 'datetimecombo',
177     'dbType' => 'datetime',
178     'massupdate'=>false,
179     'comment' => 'Date meeting ends',
180     'enable_range_search' => true,
181     'options' => 'date_range_search_dom',
182   ),
183   'parent_type' =>
184   array (
185     'name' => 'parent_type',
186     'vname'=>'LBL_PARENT_TYPE',
187     'type' =>'parent_type',
188     'dbType' => 'varchar',
189     'group'=>'parent_name',
190     'options'=> 'parent_type_display',
191     'len' => 100,
192     'comment' => 'Module meeting is associated with',
193     'studio' => array('searchview'=>false),
194   ),
195   'status' =>
196   array (
197     'name' => 'status',
198     'vname' => 'LBL_STATUS',
199     'type' => 'enum',
200     'len' => 100,
201     'options' => 'meeting_status_dom',
202     'comment' => 'Meeting status (ex: Planned, Held, Not held)',
203     'default' => 'Planned',
204   ),
205   'type' =>
206    array (
207      'name' => 'type',
208      'vname' => 'LBL_TYPE',
209      'type' => 'enum',
210      'len' => 255,
211      'function' => 'getMeetingsExternalApiDropDown',
212      'comment' => 'Meeting type (ex: WebEx, Other)',
213      'options' => 'eapm_list',
214      'default'  => 'Sugar',
215      'massupdate' => false,
216          'studio' => 'false',
217    ),
218   // Bug 24170 - Added only to allow the sidequickcreate form to work correctly
219   'direction' =>
220   array (
221     'name' => 'direction',
222     'vname' => 'LBL_DIRECTION',
223     'type' => 'enum',
224     'len' => 100,
225     'options' => 'call_direction_dom',
226     'comment' => 'Indicates whether call is inbound or outbound',
227     'source' => 'non-db',
228     'importable' => 'false',
229     'massupdate'=>false,
230     'reportable'=>false,
231         'studio' => 'false',
232   ),
233   'parent_id' =>
234   array (
235     'name' => 'parent_id',
236     'vname'=>'LBL_PARENT_ID',
237     'type' => 'id',
238     'group'=>'parent_name',
239     'reportable'=>false,
240     'comment' => 'ID of item indicated by parent_type',
241     'studio' => array('searchview'=>false),
242   ),
243   'reminder_checked' => array(
244     'name' => 'reminder_checked',
245     'vname' => 'LBL_REMINDER',
246     'type' => 'bool',
247     'source' => 'non-db',
248     'comment' => 'checkbox indicating whether or not the reminder value is set (Meta-data only)',
249     'massupdate' => false,
250    ),
251   'reminder_time' =>
252   array (
253     'name' => 'reminder_time',
254     'vname' => 'LBL_REMINDER_TIME',
255     'type' => 'enum',
256     'dbType' => 'int',
257     'options' => 'reminder_time_options',
258     'reportable' => false,
259     'massupdate' => false,
260     'default'=> -1,
261     'comment' => 'Specifies when a reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
262   ),  
263   'email_reminder_checked' => array(
264     'name' => 'email_reminder_checked',
265     'vname' => 'LBL_EMAIL_REMINDER',
266     'type' => 'bool',
267     'source' => 'non-db',
268     'comment' => 'checkbox indicating whether or not the email reminder value is set (Meta-data only)',
269     'massupdate' => false,
270    ),  
271   'email_reminder_time' =>
272   array (
273     'name' => 'email_reminder_time',
274     'vname' => 'LBL_EMAIL_REMINDER_TIME',
275     'type' => 'enum',
276     'dbType' => 'int',
277     'options' => 'reminder_time_options',
278     'reportable' => false,
279     'massupdate' => false,
280     'default'=> -1,
281     'comment' => 'Specifies when a email reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
282   ),  
283   'email_reminder_sent' => array( 
284     'name' => 'email_reminder_sent',
285     'vname' => 'LBL_EMAIL_REMINDER_SENT',
286     'default' => 0,
287     'type' => 'bool',
288     'comment' => 'Whether email reminder is already sent',
289     'studio' => false,
290     'massupdate'=> false,
291    ), 
292    'outlook_id' =>
293   array (
294     'name' => 'outlook_id',
295     'vname' => 'LBL_OUTLOOK_ID',
296     'type' => 'varchar',
297     'len' => '255',
298     'reportable' => false,
299     'comment' => 'When the Sugar Plug-in for Microsoft Outlook syncs an Outlook appointment, this is the Outlook appointment item ID'
300   ),
301    'sequence' =>
302   array (
303     'name' => 'sequence',
304     'vname' => 'LBL_SEQUENCE',
305     'type' => 'int',
306     'len' => '11',
307     'reportable' => false,
308     'default'=>0,
309     'comment' => 'Meeting update sequence for meetings as per iCalendar standards',
310   ),
311
312   'contact_name' =>
313   array (
314     'name' => 'contact_name',
315     'rname' => 'last_name',
316     'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
317     'id_name' => 'contact_id',
318     'massupdate' => false,
319     'vname' => 'LBL_CONTACT_NAME',
320     'type' => 'relate',
321     'link'=>'contacts',
322     'table' => 'contacts',
323     'isnull' => 'true',
324     'module' => 'Contacts',
325     'join_name' => 'contacts',
326     'dbType' => 'varchar',
327     'source'=>'non-db',
328     'len' => 36,
329         'studio' => 'false',
330         ),
331
332   'contacts' =>
333   array (
334         'name' => 'contacts',
335     'type' => 'link',
336     'relationship' => 'meetings_contacts',
337     'source'=>'non-db',
338                 'vname'=>'LBL_CONTACTS',
339   ),
340    'parent_name'=>
341         array(
342                 'name'=> 'parent_name',
343                 'parent_type'=>'record_type_display' ,
344                 'type_name'=>'parent_type',
345                 'id_name'=>'parent_id',
346                 'vname'=>'LBL_LIST_RELATED_TO',
347                 'type'=>'parent',
348                 'group'=>'parent_name',
349                 'source'=>'non-db',
350                 'options'=> 'parent_type_display',
351                 ),
352   'users' =>
353   array (
354         'name' => 'users',
355     'type' => 'link',
356     'relationship' => 'meetings_users',
357     'source'=>'non-db',
358                 'vname'=>'LBL_USERS',
359   ),
360   'accounts' =>
361   array (
362         'name' => 'accounts',
363     'type' => 'link',
364     'relationship' => 'account_meetings',
365     'source'=>'non-db',
366                 'vname'=>'LBL_ACCOUNT',
367   ),
368   'leads' =>
369   array (
370     'name' => 'leads',
371     'type' => 'link',
372     'relationship' => 'meetings_leads',
373     'source'=>'non-db',
374         'vname'=>'LBL_LEADS',
375   ),
376   'opportunity' =>
377   array (
378         'name' => 'opportunity',
379     'type' => 'link',
380     'relationship' => 'opportunity_meetings',
381     'source'=>'non-db',
382                 'vname'=>'LBL_OPPORTUNITY',
383   ),
384   'case' =>
385   array (
386         'name' => 'case',
387     'type' => 'link',
388     'relationship' => 'case_meetings',
389     'source'=>'non-db',
390                 'vname'=>'LBL_CASE',
391   ),
392     'notes' =>
393   array (
394         'name' => 'notes',
395     'type' => 'link',
396     'relationship' => 'meetings_notes',
397     'module'=>'Notes',
398     'bean_name'=>'Note',
399     'source'=>'non-db',
400                 'vname'=>'LBL_NOTES',
401   ),
402         'contact_id' => array(
403                 'name' => 'contact_id',
404                 'type' => 'id',
405                 'source' => 'non-db',
406         ),
407         'repeat_type' =>
408         array(
409                 'name' => 'repeat_type',
410                 'vname' => 'LBL_REPEAT_TYPE',
411                 'type' => 'enum',
412                 'len' => 36,
413                 'options' => 'repeat_type_dom',
414                 'comment' => 'Type of recurrence',
415                 'importable' => 'false',
416                 'massupdate' => false,
417                 'reportable' => false,
418                 'studio' => 'false',
419         ),      
420         'repeat_interval' =>
421         array(
422                 'name' => 'repeat_interval',
423                 'vname' => 'LBL_REPEAT_INTERVAL',
424                 'type' => 'int',
425                 'len' => 3,
426                 'default' => 1,
427                 'comment' => 'Interval of recurrence',
428                 'importable' => 'false',
429                 'massupdate' => false,
430                 'reportable' => false,
431                 'studio' => 'false',
432         ),      
433         'repeat_dow' =>
434         array(
435                 'name' => 'repeat_dow',
436                 'vname' => 'LBL_REPEAT_DOW',
437                 'type' => 'varchar',
438                 'len' => 7,
439                 'comment' => 'Days of week in recurrence',
440                 'importable' => 'false',
441                 'massupdate' => false,
442                 'reportable' => false,
443                 'studio' => 'false',
444         ),      
445         'repeat_until' =>
446         array(
447                 'name' => 'repeat_until',
448                 'vname' => 'LBL_REPEAT_UNTIL',
449                 'type' => 'date',
450                 'comment' => 'Repeat until specified date',
451                 'importable' => 'false',
452                 'massupdate' => false,
453                 'reportable' => false,
454                 'studio' => 'false',
455         ),      
456         'repeat_count' =>
457         array(
458                 'name' => 'repeat_count',
459                 'vname' => 'LBL_REPEAT_COUNT',
460                 'type' => 'int',
461                 'len' => 7,
462                 'comment' => 'Number of recurrence',
463                 'importable' => 'false',
464                 'massupdate' => false,
465                 'reportable' => false,
466                 'studio' => 'false',
467         ),
468         'repeat_parent_id' =>
469         array(
470                 'name' => 'repeat_parent_id',
471                 'vname' => 'LBL_REPEAT_PARENT_ID',
472                 'type' => 'id',
473                 'len' => 36,
474                 'comment' => 'Id of the first element of recurring records',
475                 'importable' => 'false',
476                 'massupdate' => false,
477                 'reportable' => false,
478                 'studio' => 'false',
479         ),
480         'recurring_source' =>
481         array(
482                 'name' => 'recurring_source',
483                 'vname' => 'LBL_RECURRING_SOURCE',
484                 'type' => 'varchar',
485                 'len' => 36,
486                 'comment' => 'Source of recurring meeting',
487                 'importable' => false,
488                 'massupdate' => false,
489                 'reportable' => false,
490                 'studio' => false,
491         ),
492         'duration' =>
493         array(
494                 'name' => 'duration',
495                 'vname' => 'LBL_DURATION',
496                 'type' => 'enum',
497                 'options' => 'duration_dom',
498                 'source' => 'non-db',
499                 'comment' => 'Duration handler dropdown',
500                 'massupdate' => false,
501                 'reportable' => false,
502                 'importable' => false,
503         ),
504 ),
505  'relationships' => array (
506           'meetings_assigned_user' =>
507    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
508    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'assigned_user_id',
509    'relationship_type'=>'one-to-many')
510
511    ,'meetings_modified_user' =>
512    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
513    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'modified_user_id',
514    'relationship_type'=>'one-to-many')
515
516    ,'meetings_created_by' =>
517    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
518    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'created_by',
519    'relationship_type'=>'one-to-many')
520
521         ,'meetings_notes' => array('lhs_module'=> 'Meetings', 'lhs_table'=> 'meetings', 'lhs_key' => 'id',
522                                                           'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
523                                                           'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
524                                                           'relationship_role_column_value'=>'Meetings')
525         )
526
527                                                       , 'indices' => array (
528        array('name' =>'idx_mtg_name', 'type'=>'index', 'fields'=>array('name')),
529        array('name' =>'idx_meet_par_del', 'type'=>'index', 'fields'=>array('parent_id','parent_type','deleted')),
530        array('name' => 'idx_meet_stat_del', 'type' => 'index', 'fields'=> array('assigned_user_id', 'status', 'deleted')),
531        array('name' => 'idx_meet_date_start', 'type' => 'index', 'fields'=> array('date_start')),
532
533                                                    )
534 //This enables optimistic locking for Saves From EditView
535         ,'optimistic_locking'=>true,
536                             );
537
538 VardefManager::createVardef('Meetings','Meeting', array('default', 'assignable',
539 ));
540 ?>