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