]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Meetings/vardefs.php
Release 6.2.3
[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-2011 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, '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     'len' => '50',
51     'comment' => 'Meeting name',
52     'importable' => 'required',
53   ),
54   'accept_status' => array (
55     'name' => 'accept_status',
56     'vname' => 'LBL_SUBJECT',
57     'type' => 'varchar',
58     'dbType' => 'varchar',
59     'len' => '20',
60     'source'=>'non-db',
61   ),
62   //bug 39559 
63   'set_accept_links' => array (
64     'name' => 'accept_status',
65     'vname' => 'LBL_SUBJECT',
66     'type' => 'varchar',
67     'dbType' => 'varchar',
68     'len' => '20',
69     'source'=>'non-db',
70   ),
71   'location' =>
72   array (
73     'name' => 'location',
74     'vname' => 'LBL_LOCATION',
75     'type' => 'varchar',
76     'len' => '50',
77     'comment' => 'Meeting location'
78   ),
79   'password' =>
80   array (
81     'name' => 'password',
82     'vname' => 'LBL_PASSWORD',
83     'type' => 'varchar',
84     'len' => '50',
85     'comment' => 'Meeting password',
86     'studio' => 'false',
87   ),
88   'join_url' =>
89   array (
90     'name' => 'join_url',
91     'vname' => 'LBL_URL',
92     'type' => 'varchar',
93     'len' => '200',
94     'comment' => 'Join URL',
95     'studio' => 'false',
96     'reportable' => false,
97   ),
98   'host_url' =>
99   array (
100     'name' => 'host_url',
101     'vname' => 'LBL_URL',
102     'type' => 'varchar',
103     'len' => '400',
104     'comment' => 'Host URL',
105     'studio' => 'false',
106     'reportable' => false,
107   ),
108   'displayed_url' =>
109   array (
110     'name' => 'displayed_url',
111     'vname' => 'LBL_URL',
112     'type' => 'url',
113     'len' => '400',
114     'comment' => 'Meeting URL',
115     'studio' => 'false',
116   ),
117   'creator' =>
118   array (
119     'name' => 'creator',
120     'vname' => 'LBL_CREATOR',
121     'type' => 'varchar',
122     'len' => '50',
123     'comment' => 'Meeting creator',
124     'studio' => 'false',
125   ),
126   'external_id' =>
127   array (
128     'name' => 'external_id',
129     'vname' => 'LBL_EXTERNALID',
130     'type' => 'varchar',
131     'len' => '50',
132     'comment' => 'Meeting ID for external app API',
133     'studio' => 'false',
134    ),
135   'duration_hours' =>
136   array (
137     'name' => 'duration_hours',
138     'vname' => 'LBL_DURATION_HOURS',
139     'type' => 'int',
140     'len' => '2',
141     'comment' => 'Duration (hours)',
142     'importable' => 'required',
143     'required' => true,
144   ),
145   'duration_minutes' =>
146   array (
147     'name' => 'duration_minutes',
148     'vname' => 'LBL_DURATION_MINUTES',
149     'type' => 'int',
150     'group'=>'duration_hours',
151     'function' => array('name'=>'getDurationMinutesOptions', 'returns'=>'html', 'include'=>'modules/Calls/CallHelper.php'),
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   ),
167
168   'date_end' =>
169   array (
170     'name' => 'date_end',
171     'vname' => 'LBL_DATE_END',
172     'type' => 'datetime',
173     'massupdate'=>false,
174     'comment' => 'Date meeting ends',
175     'enable_range_search' => true,
176     'options' => 'date_range_search_dom',
177   ),
178   'parent_type' =>
179   array (
180     'name' => 'parent_type',
181     'vname'=>'LBL_LIST_RELATED_TO',
182     'type' =>'parent_type',
183     'dbType' => 'varchar',
184     'group'=>'parent_name',
185     'len' => 100,
186     'comment' => 'Module meeting is associated with',
187     'studio' => array('searchview'=>false),
188   ),
189   'status' =>
190   array (
191     'name' => 'status',
192     'vname' => 'LBL_STATUS',
193     'type' => 'enum',
194     'len' => 100,
195     'options' => 'meeting_status_dom',
196     'comment' => 'Meeting status (ex: Planned, Held, Not held)',
197     'default' => 'Planned',
198   ),
199   'type' =>
200    array (
201      'name' => 'type',
202      'vname' => 'LBL_TYPE',
203      'type' => 'enum',
204      'len' => 255,
205      'function' => 'getMeetingsExternalApiDropDown',
206      'comment' => 'Meeting type (ex: WebEx, Other)',
207      'options' => 'eapm_list',
208      'default'  => 'Sugar',
209      'massupdate' => false,
210          'studio' => 'false',
211    ),
212   // Bug 24170 - Added only to allow the sidequickcreate form to work correctly
213   'direction' =>
214   array (
215     'name' => 'direction',
216     'vname' => 'LBL_DIRECTION',
217     'type' => 'enum',
218     'len' => 100,
219     'options' => 'call_direction_dom',
220     'comment' => 'Indicates whether call is inbound or outbound',
221     'source' => 'non-db',
222     'importable' => 'false',
223     'massupdate'=>false,
224     'reportable'=>false,
225         'studio' => 'false',
226   ),
227   'parent_id' =>
228   array (
229     'name' => 'parent_id',
230     'vname'=>'LBL_LIST_RELATED_TO',
231     'type' => 'id',
232     'group'=>'parent_name',
233     'reportable'=>false,
234     'comment' => 'ID of item indicated by parent_type',
235     'studio' => array('searchview'=>false),
236   ),
237   'reminder_checked'=>array(
238     'name' => 'reminder_checked',
239     'vname' => 'LBL_REMINDER',
240     'type' => 'bool',
241     'source' => 'non-db',
242     'comment' => 'checkbox indicating whether or not the reminder value is set (Meta-data only)',
243     'massupdate'=>false,
244    ),
245
246   'reminder_time' =>
247   array (
248     'name' => 'reminder_time',
249     'vname' => 'LBL_REMINDER_TIME',
250     'type' => 'int',
251     'function' => array('name'=>'getReminderTime', 'returns'=>'html', 'include'=>'modules/Calls/CallHelper.php', 'onListView'=>true ),
252     'reportable' => false,
253     'default'=>-1,
254     'comment' => 'Specifies when a reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
255   ),
256    'outlook_id' =>
257   array (
258     'name' => 'outlook_id',
259     'vname' => 'LBL_OUTLOOK_ID',
260     'type' => 'varchar',
261     'len' => '255',
262     'reportable' => false,
263     'comment' => 'When the Sugar Plug-in for Microsoft Outlook syncs an Outlook appointment, this is the Outlook appointment item ID'
264   ),
265
266   'contact_name' =>
267   array (
268     'name' => 'contact_name',
269     'rname' => 'last_name',
270     'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
271     'id_name' => 'contact_id',
272     'massupdate' => false,
273     'vname' => 'LBL_CONTACT_NAME',
274     'type' => 'relate',
275     'link'=>'contacts',
276     'table' => 'contacts',
277     'isnull' => 'true',
278     'module' => 'Contacts',
279     'join_name' => 'contacts',
280     'dbType' => 'varchar',
281     'source'=>'non-db',
282     'len' => 36,
283         'studio' => 'false',
284         ),
285
286   'contacts' =>
287   array (
288         'name' => 'contacts',
289     'type' => 'link',
290     'relationship' => 'meetings_contacts',
291     'source'=>'non-db',
292                 'vname'=>'LBL_CONTACTS',
293   ),
294    'parent_name'=>
295         array(
296                 'name'=> 'parent_name',
297                 'parent_type'=>'record_type_display' ,
298                 'type_name'=>'parent_type',
299                 'id_name'=>'parent_id',
300                 'vname'=>'LBL_LIST_RELATED_TO',
301                 'type'=>'parent',
302                 'group'=>'parent_name',
303                 'source'=>'non-db',
304                 'options'=> 'parent_type_display',
305                 ),
306   'users' =>
307   array (
308         'name' => 'users',
309     'type' => 'link',
310     'relationship' => 'meetings_users',
311     'source'=>'non-db',
312                 'vname'=>'LBL_USERS',
313   ),
314   'accounts' =>
315   array (
316         'name' => 'accounts',
317     'type' => 'link',
318     'relationship' => 'account_meetings',
319     'source'=>'non-db',
320                 'vname'=>'LBL_ACCOUNT',
321   ),
322   'leads' =>
323   array (
324     'name' => 'leads',
325     'type' => 'link',
326     'relationship' => 'meetings_leads',
327     'source'=>'non-db',
328         'vname'=>'LBL_LEADS',
329   ),
330   'opportunity' =>
331   array (
332         'name' => 'opportunity',
333     'type' => 'link',
334     'relationship' => 'opportunity_meetings',
335     'source'=>'non-db',
336                 'vname'=>'LBL_OPPORTUNITY',
337   ),
338   'case' =>
339   array (
340         'name' => 'case',
341     'type' => 'link',
342     'relationship' => 'case_meetings',
343     'source'=>'non-db',
344                 'vname'=>'LBL_CASE',
345   ),
346     'notes' =>
347   array (
348         'name' => 'notes',
349     'type' => 'link',
350     'relationship' => 'meetings_notes',
351     'module'=>'Notes',
352     'bean_name'=>'Note',
353     'source'=>'non-db',
354                 'vname'=>'LBL_NOTES',
355   ),
356         'contact_id' => array(
357                 'name' => 'contact_id',
358                 'type' => 'id',
359                 'source' => 'non-db',
360         ),
361 ),
362  'relationships' => array (
363           'meetings_assigned_user' =>
364    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
365    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'assigned_user_id',
366    'relationship_type'=>'one-to-many')
367
368    ,'meetings_modified_user' =>
369    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
370    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'modified_user_id',
371    'relationship_type'=>'one-to-many')
372
373    ,'meetings_created_by' =>
374    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
375    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'created_by',
376    'relationship_type'=>'one-to-many')
377
378         ,'meetings_notes' => array('lhs_module'=> 'Meetings', 'lhs_table'=> 'meetings', 'lhs_key' => 'id',
379                                                           'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
380                                                           'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
381                                                           'relationship_role_column_value'=>'Meetings')
382         )
383
384                                                       , 'indices' => array (
385        array('name' =>'idx_mtg_name', 'type'=>'index', 'fields'=>array('name')),
386        array('name' =>'idx_meet_par_del', 'type'=>'index', 'fields'=>array('parent_id','parent_type','deleted')),
387        array('name' => 'idx_meet_stat_del', 'type' => 'index', 'fields'=> array('assigned_user_id', 'status', 'deleted')),
388
389                                                    )
390 //This enables optimistic locking for Saves From EditView
391         ,'optimistic_locking'=>true,
392                             );
393
394 VardefManager::createVardef('Meetings','Meeting', array('default', 'assignable',
395 ));
396 ?>