]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Meetings/vardefs.php
Release 6.2.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-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   ),
166
167   'date_end' =>
168   array (
169     'name' => 'date_end',
170     'vname' => 'LBL_DATE_END',
171     'type' => 'datetime',
172     'massupdate'=>false,
173     'comment' => 'Date meeting ends',
174     'enable_range_search' => true,
175   ),
176   'parent_type' =>
177   array (
178     'name' => 'parent_type',
179     'vname'=>'LBL_LIST_RELATED_TO',
180     'type' =>'parent_type',
181     'dbType' => 'varchar',
182     'group'=>'parent_name',
183     'len' => 100,
184     'comment' => 'Module meeting is associated with'
185   ),
186   'status' =>
187   array (
188     'name' => 'status',
189     'vname' => 'LBL_STATUS',
190     'type' => 'enum',
191     'len' => 100,
192     'options' => 'meeting_status_dom',
193     'comment' => 'Meeting status (ex: Planned, Held, Not held)',
194     'default' => 'Planned',
195   ),
196   'type' =>
197    array (
198      'name' => 'type',
199      'vname' => 'LBL_TYPE',
200      'type' => 'enum',
201      'len' => 255,
202      'function' => 'getMeetingsExternalApiDropDown',
203      'comment' => 'Meeting type (ex: WebEx, Other)',
204      'options' => 'eapm_list',
205      'default'  => 'Sugar',
206      'massupdate' => false,
207          'studio' => 'false',
208    ),
209   // Bug 24170 - Added only to allow the sidequickcreate form to work correctly
210   'direction' =>
211   array (
212     'name' => 'direction',
213     'vname' => 'LBL_DIRECTION',
214     'type' => 'enum',
215     'len' => 100,
216     'options' => 'call_direction_dom',
217     'comment' => 'Indicates whether call is inbound or outbound',
218     'source' => 'non-db',
219     'importable' => 'false',
220     'massupdate'=>false,
221     'reportable'=>false,
222         'studio' => 'false',
223   ),
224   'parent_id' =>
225   array (
226     'name' => 'parent_id',
227     'vname'=>'LBL_LIST_RELATED_TO',
228     'type' => 'id',
229     'group'=>'parent_name',
230     'reportable'=>false,
231     'comment' => 'ID of item indicated by parent_type'
232   ),
233   'reminder_checked'=>array(
234     'name' => 'reminder_checked',
235     'vname' => 'LBL_REMINDER',
236     'type' => 'bool',
237     'source' => 'non-db',
238     'comment' => 'checkbox indicating whether or not the reminder value is set (Meta-data only)',
239     'massupdate'=>false,
240    ),
241
242   'reminder_time' =>
243   array (
244     'name' => 'reminder_time',
245     'vname' => 'LBL_REMINDER_TIME',
246     'type' => 'int',
247     'function' => array('name'=>'getReminderTime', 'returns'=>'html', 'include'=>'modules/Calls/CallHelper.php', 'onListView'=>true ),
248     'reportable' => false,
249     'default'=>-1,
250     'comment' => 'Specifies when a reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
251   ),
252    'outlook_id' =>
253   array (
254     'name' => 'outlook_id',
255     'vname' => 'LBL_OUTLOOK_ID',
256     'type' => 'varchar',
257     'len' => '255',
258     'reportable' => false,
259     'comment' => 'When the Sugar Plug-in for Microsoft Outlook syncs an Outlook appointment, this is the Outlook appointment item ID'
260   ),
261
262   'contact_name' =>
263   array (
264     'name' => 'contact_name',
265     'rname' => 'last_name',
266     'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
267     'id_name' => 'contact_id',
268     'massupdate' => false,
269     'vname' => 'LBL_CONTACT_NAME',
270     'type' => 'relate',
271     'link'=>'contacts',
272     'table' => 'contacts',
273     'isnull' => 'true',
274     'module' => 'Contacts',
275     'join_name' => 'contacts',
276     'dbType' => 'varchar',
277     'source'=>'non-db',
278     'len' => 36,
279         'studio' => 'false',
280         ),
281
282   'contacts' =>
283   array (
284         'name' => 'contacts',
285     'type' => 'link',
286     'relationship' => 'meetings_contacts',
287     'source'=>'non-db',
288                 'vname'=>'LBL_CONTACTS',
289   ),
290    'parent_name'=>
291         array(
292                 'name'=> 'parent_name',
293                 'parent_type'=>'record_type_display' ,
294                 'type_name'=>'parent_type',
295                 'id_name'=>'parent_id',
296                 'vname'=>'LBL_LIST_RELATED_TO',
297                 'type'=>'parent',
298                 'group'=>'parent_name',
299                 'source'=>'non-db',
300                 'options'=> 'parent_type_display',
301                 ),
302   'users' =>
303   array (
304         'name' => 'users',
305     'type' => 'link',
306     'relationship' => 'meetings_users',
307     'source'=>'non-db',
308                 'vname'=>'LBL_USERS',
309   ),
310   'accounts' =>
311   array (
312         'name' => 'accounts',
313     'type' => 'link',
314     'relationship' => 'account_meetings',
315     'source'=>'non-db',
316                 'vname'=>'LBL_ACCOUNT',
317   ),
318   'leads' =>
319   array (
320     'name' => 'leads',
321     'type' => 'link',
322     'relationship' => 'meetings_leads',
323     'source'=>'non-db',
324         'vname'=>'LBL_LEADS',
325   ),
326   'opportunity' =>
327   array (
328         'name' => 'opportunity',
329     'type' => 'link',
330     'relationship' => 'opportunity_meetings',
331     'source'=>'non-db',
332                 'vname'=>'LBL_OPPORTUNITY',
333   ),
334   'case' =>
335   array (
336         'name' => 'case',
337     'type' => 'link',
338     'relationship' => 'case_meetings',
339     'source'=>'non-db',
340                 'vname'=>'LBL_CASE',
341   ),
342     'notes' =>
343   array (
344         'name' => 'notes',
345     'type' => 'link',
346     'relationship' => 'meetings_notes',
347     'module'=>'Notes',
348     'bean_name'=>'Note',
349     'source'=>'non-db',
350                 'vname'=>'LBL_NOTES',
351   ),
352         'contact_id' => array(
353                 'name' => 'contact_id',
354                 'type' => 'id',
355                 'source' => 'non-db',
356         ),
357 ),
358  'relationships' => array (
359           'meetings_assigned_user' =>
360    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
361    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'assigned_user_id',
362    'relationship_type'=>'one-to-many')
363
364    ,'meetings_modified_user' =>
365    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
366    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'modified_user_id',
367    'relationship_type'=>'one-to-many')
368
369    ,'meetings_created_by' =>
370    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
371    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'created_by',
372    'relationship_type'=>'one-to-many')
373
374         ,'meetings_notes' => array('lhs_module'=> 'Meetings', 'lhs_table'=> 'meetings', 'lhs_key' => 'id',
375                                                           'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
376                                                           'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
377                                                           'relationship_role_column_value'=>'Meetings')
378         )
379
380                                                       , 'indices' => array (
381        array('name' =>'idx_mtg_name', 'type'=>'index', 'fields'=>array('name')),
382        array('name' =>'idx_meet_par_del', 'type'=>'index', 'fields'=>array('parent_id','parent_type','deleted')),
383        array('name' => 'idx_meet_stat_del', 'type' => 'index', 'fields'=> array('assigned_user_id', 'status', 'deleted')),
384
385                                                    )
386 //This enables optimistic locking for Saves From EditView
387         ,'optimistic_locking'=>true,
388                             );
389
390 VardefManager::createVardef('Meetings','Meeting', array('default', 'assignable',
391 ));
392 ?>