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