2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
41 'name' => 'salutation',
42 'vname' => 'LBL_SALUTATION',
44 'options' => 'salutation_dom',
45 'massupdate' => false,
47 'comment' => 'Contact salutation (e.g., Mr, Ms)'
51 'name' => 'first_name',
52 'vname' => 'LBL_FIRST_NAME',
55 'unified_search' => true,
56 'comment' => 'First name of the contact',
57 'merge_filter' => 'selected',
62 'name' => 'last_name',
63 'vname' => 'LBL_LAST_NAME',
66 'unified_search' => true,
67 'comment' => 'Last name of the contact',
68 'merge_filter' => 'selected',
70 'importable' => 'required',
76 'vname' => 'LBL_NAME',
78 'fields' => array('first_name', 'last_name'),
79 'sort_on' => 'last_name',
83 'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
84 'importable' => 'false',
88 'name' => 'full_name',
89 'rname' => 'full_name',
90 'vname' => 'LBL_NAME',
92 'fields' => array('first_name', 'last_name'),
93 'sort_on' => 'last_name',
97 'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
98 'studio' => array('listview' => false),
103 'vname' => 'LBL_TITLE',
106 'comment' => 'The title of the contact'
110 'name' => 'department',
111 'vname' => 'LBL_DEPARTMENT',
114 'comment' => 'The department of the contact',
115 'merge_filter' => 'enabled',
119 'name' => 'do_not_call',
120 'vname' => 'LBL_DO_NOT_CALL',
124 'comment' => 'An indicator of whether contact can be called'
128 'name' => 'phone_home',
129 'vname' => 'LBL_HOME_PHONE',
131 'dbType' => 'varchar',
133 'unified_search' => true,
134 'comment' => 'Home phone number of the contact',
135 'merge_filter' => 'enabled',
139 'name' => 'phone_mobile',
140 'vname' => 'LBL_MOBILE_PHONE',
142 'dbType' => 'varchar',
144 'unified_search' => true,
145 'comment' => 'Mobile phone number of the contact',
146 'merge_filter' => 'enabled',
150 'name' => 'phone_work',
151 'vname' => 'LBL_OFFICE_PHONE',
153 'dbType' => 'varchar',
156 'unified_search' => true,
157 'comment' => 'Work phone number of the contact',
158 'merge_filter' => 'enabled',
162 'name' => 'phone_other',
163 'vname' => 'LBL_OTHER_PHONE',
165 'dbType' => 'varchar',
167 'unified_search' => true,
168 'comment' => 'Other phone number for the contact',
169 'merge_filter' => 'enabled',
173 'name' => 'phone_fax',
174 'vname' => 'LBL_FAX_PHONE',
176 'dbType' => 'varchar',
178 'unified_search' => true,
179 'comment' => 'Contact fax number',
180 'merge_filter' => 'enabled',
185 'vname' => 'LBL_EMAIL_ADDRESS',
188 'name' => 'getEmailAddressWidget',
189 'returns' => 'html'),
190 'source' => 'non-db',
192 'merge_filter' => 'enabled',
193 'studio' => array('editField' => true),
198 'vname' => 'LBL_OTHER_EMAIL_ADDRESS',
201 'name' => 'getEmailAddressWidget',
202 'returns' => 'html'),
203 'source' => 'non-db',
205 'merge_filter' => 'enabled',
210 'name' => 'invalid_email',
211 'vname' => 'LBL_INVALID_EMAIL',
212 'source' => 'non-db',
214 'massupdate' => false,
219 'name' => 'email_opt_out',
220 'vname' => 'LBL_EMAIL_OPT_OUT',
221 'source' => 'non-db',
223 'massupdate' => false,
226 'primary_address_street' =>
228 'name' => 'primary_address_street',
229 'vname' => 'LBL_PRIMARY_ADDRESS_STREET',
232 'group'=>'primary_address',
233 'comment' => 'Street address for primary address',
234 'merge_filter' => 'enabled',
236 'primary_address_street_2' =>
238 'name' => 'primary_address_street_2',
239 'vname' => 'LBL_PRIMARY_ADDRESS_STREET_2',
242 'source' => 'non-db',
244 'primary_address_street_3' =>
246 'name' => 'primary_address_street_3',
247 'vname' => 'LBL_PRIMARY_ADDRESS_STREET_3',
250 'source' => 'non-db',
252 'primary_address_city' =>
254 'name' => 'primary_address_city',
255 'vname' => 'LBL_PRIMARY_ADDRESS_CITY',
258 'group'=>'primary_address',
259 'comment' => 'City for primary address',
260 'merge_filter' => 'enabled',
262 'primary_address_state' =>
264 'name' => 'primary_address_state',
265 'vname' => 'LBL_PRIMARY_ADDRESS_STATE',
268 'group'=>'primary_address',
269 'comment' => 'State for primary address',
270 'merge_filter' => 'enabled',
272 'primary_address_postalcode' =>
274 'name' => 'primary_address_postalcode',
275 'vname' => 'LBL_PRIMARY_ADDRESS_POSTALCODE',
278 'group'=>'primary_address',
279 'comment' => 'Postal code for primary address',
280 'merge_filter' => 'enabled',
283 'primary_address_country' =>
285 'name' => 'primary_address_country',
286 'vname' => 'LBL_PRIMARY_ADDRESS_COUNTRY',
288 'group'=>'primary_address',
289 'comment' => 'Country for primary address',
290 'merge_filter' => 'enabled',
292 'alt_address_street' =>
294 'name' => 'alt_address_street',
295 'vname' => 'LBL_ALT_ADDRESS_STREET',
298 'group'=>'alt_address',
299 'comment' => 'Street address for alternate address',
300 'merge_filter' => 'enabled',
302 'alt_address_street_2' =>
304 'name' => 'alt_address_street_2',
305 'vname' => 'LBL_ALT_ADDRESS_STREET_2',
308 'source' => 'non-db',
310 'alt_address_street_3' =>
312 'name' => 'alt_address_street_3',
313 'vname' => 'LBL_ALT_ADDRESS_STREET_3',
316 'source' => 'non-db',
318 'alt_address_city' =>
320 'name' => 'alt_address_city',
321 'vname' => 'LBL_ALT_ADDRESS_CITY',
324 'group'=>'alt_address',
325 'comment' => 'City for alternate address',
326 'merge_filter' => 'enabled',
328 'alt_address_state' =>
330 'name' => 'alt_address_state',
331 'vname' => 'LBL_ALT_ADDRESS_STATE',
334 'group'=>'alt_address',
335 'comment' => 'State for alternate address',
336 'merge_filter' => 'enabled',
338 'alt_address_postalcode' =>
340 'name' => 'alt_address_postalcode',
341 'vname' => 'LBL_ALT_ADDRESS_POSTALCODE',
344 'group'=>'alt_address',
345 'comment' => 'Postal code for alternate address',
346 'merge_filter' => 'enabled',
348 'alt_address_country' =>
350 'name' => 'alt_address_country',
351 'vname' => 'LBL_ALT_ADDRESS_COUNTRY',
353 'group'=>'alt_address',
354 'comment' => 'Country for alternate address',
355 'merge_filter' => 'enabled',
359 'name' => 'assistant',
360 'vname' => 'LBL_ASSISTANT',
363 'unified_search' => true,
364 'comment' => 'Name of the assistant of the contact',
365 'merge_filter' => 'enabled',
369 'name' => 'assistant_phone',
370 'vname' => 'LBL_ASSISTANT_PHONE',
372 'dbType' => 'varchar',
374 'group'=>'assistant',
375 'unified_search' => true,
376 'comment' => 'Phone number of the assistant of the contact',
377 'merge_filter' => 'enabled',
379 'email_addresses_primary' =>
381 'name' => 'email_addresses_primary',
383 'relationship' => strtolower($object_name).'_email_addresses_primary',
384 'source' => 'non-db',
385 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
386 'duplicate_merge' => 'disabled',
390 'name' => 'email_addresses',
392 'relationship' => strtolower($object_name).'_email_addresses',
393 'source' => 'non-db',
394 'vname' => 'LBL_EMAIL_ADDRESSES',
396 'unified_search' => true,
397 'rel_fields' => array('primary_address' => array('type'=>'bool')),
400 'relationships'=>array(
401 strtolower($module).'_email_addresses' =>
403 'lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
404 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
405 'relationship_type'=>'many-to-many',
406 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
407 'relationship_role_column'=>'bean_module',
408 'relationship_role_column_value'=>$module
410 strtolower($module).'_email_addresses_primary' =>
411 array('lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
412 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
413 'relationship_type'=>'many-to-many',
414 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
415 'relationship_role_column'=>'primary_address',
416 'relationship_role_column_value'=>'1'