]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Meetings/vardefs.php
Release 6.1.5
[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,
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   'duration_hours' =>
80   array (
81     'name' => 'duration_hours',
82     'vname' => 'LBL_DURATION_HOURS',
83     'type' => 'int',
84     'len' => '2',
85     'comment' => 'Duration (hours)',
86     'importable' => 'required',
87     'required' => true,
88   ),
89   'duration_minutes' =>
90   array (
91     'name' => 'duration_minutes',
92     'vname' => 'LBL_DURATION_MINUTES',
93     'type' => 'int',
94     'group'=>'duration_hours',
95     'function' => array('name'=>'getDurationMinutesOptions', 'returns'=>'html', 'include'=>'modules/Calls/CallHelper.php'),
96     'len' => '2',
97     'comment' => 'Duration (minutes)'
98   ),
99   'date_start' =>
100   array (
101     'name' => 'date_start',
102     'vname' => 'LBL_DATE',
103     'type' => 'datetimecombo',
104     'dbType' => 'datetime',
105     'comment' => 'Date of start of meeting',
106     'importable' => 'required',
107     'required' => true,
108   ),
109
110   'date_end' =>
111   array (
112     'name' => 'date_end',
113     'vname' => 'LBL_DATE_END',
114     'type' => 'date',
115     'massupdate'=>false,
116     'comment' => 'Date meeting ends'
117   ),
118   'parent_type' =>
119   array (
120     'name' => 'parent_type',
121     'vname'=>'LBL_LIST_RELATED_TO',
122     'type' =>'parent_type',
123     'dbType' => 'varchar',
124     'group'=>'parent_name',
125     'len' => 100,
126     'comment' => 'Module meeting is associated with'
127   ),
128   'status' =>
129   array (
130     'name' => 'status',
131     'vname' => 'LBL_STATUS',
132     'type' => 'enum',
133     'len' => 100,
134     'options' => 'meeting_status_dom',
135     'comment' => 'Meeting status (ex: Planned, Held, Not held)'
136   ),
137   // Bug 24170 - Added only to allow the sidequickcreate form to work correctly
138   'direction' =>
139   array (
140     'name' => 'direction',
141     'vname' => 'LBL_DIRECTION',
142     'type' => 'enum',
143     'len' => 100,
144     'options' => 'call_direction_dom',
145     'comment' => 'Indicates whether call is inbound or outbound',
146     'source' => 'non-db',
147     'importable' => 'false',
148     'massupdate'=>false,
149     'reportable'=>false,
150         'studio' => false,
151   ),
152   'parent_id' =>
153   array (
154     'name' => 'parent_id',
155     'vname'=>'LBL_LIST_RELATED_TO',
156     'type' => 'id',
157     'group'=>'parent_name',
158     'reportable'=>false,
159     'comment' => 'ID of item indicated by parent_type'
160   ),
161   'reminder_checked'=>array(
162     'name' => 'reminder_checked',
163     'vname' => 'LBL_REMINDER',
164     'type' => 'bool',
165     'source' => 'non-db',
166     'comment' => 'checkbox indicating whether or not the reminder value is set (Meta-data only)',
167     'massupdate'=>false,
168    ),
169
170   'reminder_time' =>
171   array (
172     'name' => 'reminder_time',
173     'vname' => 'LBL_REMINDER_TIME',
174     'type' => 'int',
175     'function' => array('name'=>'getReminderTime', 'returns'=>'html', 'include'=>'modules/Calls/CallHelper.php', 'onListView'=>true ),
176     'reportable' => false,
177     'default'=>-1,
178     'comment' => 'Specifies when a reminder alert should be issued; -1 means no alert; otherwise the number of seconds prior to the start'
179   ),
180    'outlook_id' =>
181   array (
182     'name' => 'outlook_id',
183     'vname' => 'LBL_OUTLOOK_ID',
184     'type' => 'varchar',
185     'len' => '255',
186     'reportable' => false,
187     'comment' => 'When the Sugar Plug-in for Microsoft Outlook syncs an Outlook appointment, this is the Outlook appointment item ID'
188   ),
189
190   'contact_name' =>
191   array (
192     'name' => 'contact_name',
193     'rname' => 'last_name',
194     'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
195     'id_name' => 'contact_id',
196     'massupdate' => false,
197     'vname' => 'LBL_CONTACT_NAME',
198     'type' => 'relate',
199     'link'=>'contacts',
200     'table' => 'contacts',
201     'isnull' => 'true',
202     'module' => 'Contacts',
203     'join_name' => 'contacts',
204     'dbType' => 'varchar',
205     'source'=>'non-db',
206     'len' => 36,
207         'studio' => 'false',
208         ),
209
210   'contacts' =>
211   array (
212         'name' => 'contacts',
213     'type' => 'link',
214     'relationship' => 'meetings_contacts',
215     'source'=>'non-db',
216                 'vname'=>'LBL_CONTACTS',
217   ),
218    'parent_name'=>
219         array(
220                 'name'=> 'parent_name',
221                 'parent_type'=>'record_type_display' ,
222                 'type_name'=>'parent_type',
223                 'id_name'=>'parent_id',
224                 'vname'=>'LBL_LIST_RELATED_TO',
225                 'type'=>'parent',
226                 'group'=>'parent_name',
227                 'source'=>'non-db',
228                 'options'=> 'parent_type_display',
229                 ),
230   'users' =>
231   array (
232         'name' => 'users',
233     'type' => 'link',
234     'relationship' => 'meetings_users',
235     'source'=>'non-db',
236                 'vname'=>'LBL_USERS',
237   ),
238   'accounts' =>
239   array (
240         'name' => 'accounts',
241     'type' => 'link',
242     'relationship' => 'account_meetings',
243     'source'=>'non-db',
244                 'vname'=>'LBL_ACCOUNT',
245   ),
246   'leads' =>
247   array (
248     'name' => 'leads',
249     'type' => 'link',
250     'relationship' => 'meetings_leads',
251     'source'=>'non-db',
252         'vname'=>'LBL_LEADS',
253   ),
254   'opportunity' =>
255   array (
256         'name' => 'opportunity',
257     'type' => 'link',
258     'relationship' => 'opportunity_meetings',
259     'source'=>'non-db',
260                 'vname'=>'LBL_OPPORTUNITY',
261   ),
262   'case' =>
263   array (
264         'name' => 'case',
265     'type' => 'link',
266     'relationship' => 'case_meetings',
267     'source'=>'non-db',
268                 'vname'=>'LBL_CASE',
269   ),
270     'notes' =>
271   array (
272         'name' => 'notes',
273     'type' => 'link',
274     'relationship' => 'meetings_notes',
275     'module'=>'Notes',
276     'bean_name'=>'Note',
277     'source'=>'non-db',
278                 'vname'=>'LBL_NOTES',
279   ),
280         'contact_id' => array(
281                 'name' => 'contact_id',
282                 'type' => 'id',
283                 'source' => 'non-db',
284         ),
285 ),
286  'relationships' => array (
287           'meetings_assigned_user' =>
288    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
289    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'assigned_user_id',
290    'relationship_type'=>'one-to-many')
291
292    ,'meetings_modified_user' =>
293    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
294    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'modified_user_id',
295    'relationship_type'=>'one-to-many')
296
297    ,'meetings_created_by' =>
298    array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
299    'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'created_by',
300    'relationship_type'=>'one-to-many')
301
302         ,'meetings_notes' => array('lhs_module'=> 'Meetings', 'lhs_table'=> 'meetings', 'lhs_key' => 'id',
303                                                           'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
304                                                           'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
305                                                           'relationship_role_column_value'=>'Meetings')
306         )
307
308                                                       , 'indices' => array (
309        array('name' =>'idx_mtg_name', 'type'=>'index', 'fields'=>array('name')),
310        array('name' =>'idx_meet_par_del', 'type'=>'index', 'fields'=>array('parent_id','parent_type','deleted')),
311        array('name' => 'idx_meet_stat_del', 'type' => 'index', 'fields'=> array('assigned_user_id', 'status', 'deleted')),
312       
313                                                    )
314 //This enables optimistic locking for Saves From EditView
315         ,'optimistic_locking'=>true,
316                             );
317
318 VardefManager::createVardef('Meetings','Meeting', array('default', 'assignable',
319 ));
320 ?>