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