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 'link' => true, // bug 39288
79 'fields' => array('first_name', 'last_name'),
80 'sort_on' => 'last_name',
84 'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
85 'importable' => 'false',
89 'name' => 'full_name',
90 'rname' => 'full_name',
91 'vname' => 'LBL_NAME',
93 'fields' => array('first_name', 'last_name'),
94 'sort_on' => 'last_name',
98 'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
99 'studio' => array('listview' => false),
104 'vname' => 'LBL_TITLE',
107 'comment' => 'The title of the contact'
111 'name' => 'department',
112 'vname' => 'LBL_DEPARTMENT',
115 'comment' => 'The department of the contact',
116 'merge_filter' => 'enabled',
120 'name' => 'do_not_call',
121 'vname' => 'LBL_DO_NOT_CALL',
125 'comment' => 'An indicator of whether contact can be called'
129 'name' => 'phone_home',
130 'vname' => 'LBL_HOME_PHONE',
132 'dbType' => 'varchar',
134 'unified_search' => true,
135 'comment' => 'Home phone number of the contact',
136 'merge_filter' => 'enabled',
140 'name' => 'phone_mobile',
141 'vname' => 'LBL_MOBILE_PHONE',
143 'dbType' => 'varchar',
145 'unified_search' => true,
146 'comment' => 'Mobile phone number of the contact',
147 'merge_filter' => 'enabled',
151 'name' => 'phone_work',
152 'vname' => 'LBL_OFFICE_PHONE',
154 'dbType' => 'varchar',
157 'unified_search' => true,
158 'comment' => 'Work phone number of the contact',
159 'merge_filter' => 'enabled',
163 'name' => 'phone_other',
164 'vname' => 'LBL_OTHER_PHONE',
166 'dbType' => 'varchar',
168 'unified_search' => true,
169 'comment' => 'Other phone number for the contact',
170 'merge_filter' => 'enabled',
174 'name' => 'phone_fax',
175 'vname' => 'LBL_FAX_PHONE',
177 'dbType' => 'varchar',
179 'unified_search' => true,
180 'comment' => 'Contact fax number',
181 'merge_filter' => 'enabled',
186 'vname' => 'LBL_EMAIL_ADDRESS',
189 'name' => 'getEmailAddressWidget',
190 'returns' => 'html'),
191 'source' => 'non-db',
193 'merge_filter' => 'enabled',
194 'studio' => array('editField' => true, 'searchview' => false), // bug 46859
200 'vname' => 'LBL_OTHER_EMAIL_ADDRESS',
203 'name' => 'getEmailAddressWidget',
204 'returns' => 'html'),
205 'source' => 'non-db',
207 'merge_filter' => 'enabled',
212 'name' => 'invalid_email',
213 'vname' => 'LBL_INVALID_EMAIL',
214 'source' => 'non-db',
216 'massupdate' => false,
221 'name' => 'email_opt_out',
222 'vname' => 'LBL_EMAIL_OPT_OUT',
223 'source' => 'non-db',
225 'massupdate' => false,
228 'primary_address_street' =>
230 'name' => 'primary_address_street',
231 'vname' => 'LBL_PRIMARY_ADDRESS_STREET',
234 'group'=>'primary_address',
235 'comment' => 'Street address for primary address',
236 'merge_filter' => 'enabled',
238 'primary_address_street_2' =>
240 'name' => 'primary_address_street_2',
241 'vname' => 'LBL_PRIMARY_ADDRESS_STREET_2',
244 'source' => 'non-db',
246 'primary_address_street_3' =>
248 'name' => 'primary_address_street_3',
249 'vname' => 'LBL_PRIMARY_ADDRESS_STREET_3',
252 'source' => 'non-db',
254 'primary_address_city' =>
256 'name' => 'primary_address_city',
257 'vname' => 'LBL_PRIMARY_ADDRESS_CITY',
260 'group'=>'primary_address',
261 'comment' => 'City for primary address',
262 'merge_filter' => 'enabled',
264 'primary_address_state' =>
266 'name' => 'primary_address_state',
267 'vname' => 'LBL_PRIMARY_ADDRESS_STATE',
270 'group'=>'primary_address',
271 'comment' => 'State for primary address',
272 'merge_filter' => 'enabled',
274 'primary_address_postalcode' =>
276 'name' => 'primary_address_postalcode',
277 'vname' => 'LBL_PRIMARY_ADDRESS_POSTALCODE',
280 'group'=>'primary_address',
281 'comment' => 'Postal code for primary address',
282 'merge_filter' => 'enabled',
285 'primary_address_country' =>
287 'name' => 'primary_address_country',
288 'vname' => 'LBL_PRIMARY_ADDRESS_COUNTRY',
290 'group'=>'primary_address',
291 'comment' => 'Country for primary address',
292 'merge_filter' => 'enabled',
294 'alt_address_street' =>
296 'name' => 'alt_address_street',
297 'vname' => 'LBL_ALT_ADDRESS_STREET',
300 'group'=>'alt_address',
301 'comment' => 'Street address for alternate address',
302 'merge_filter' => 'enabled',
304 'alt_address_street_2' =>
306 'name' => 'alt_address_street_2',
307 'vname' => 'LBL_ALT_ADDRESS_STREET_2',
310 'source' => 'non-db',
312 'alt_address_street_3' =>
314 'name' => 'alt_address_street_3',
315 'vname' => 'LBL_ALT_ADDRESS_STREET_3',
318 'source' => 'non-db',
320 'alt_address_city' =>
322 'name' => 'alt_address_city',
323 'vname' => 'LBL_ALT_ADDRESS_CITY',
326 'group'=>'alt_address',
327 'comment' => 'City for alternate address',
328 'merge_filter' => 'enabled',
330 'alt_address_state' =>
332 'name' => 'alt_address_state',
333 'vname' => 'LBL_ALT_ADDRESS_STATE',
336 'group'=>'alt_address',
337 'comment' => 'State for alternate address',
338 'merge_filter' => 'enabled',
340 'alt_address_postalcode' =>
342 'name' => 'alt_address_postalcode',
343 'vname' => 'LBL_ALT_ADDRESS_POSTALCODE',
346 'group'=>'alt_address',
347 'comment' => 'Postal code for alternate address',
348 'merge_filter' => 'enabled',
350 'alt_address_country' =>
352 'name' => 'alt_address_country',
353 'vname' => 'LBL_ALT_ADDRESS_COUNTRY',
355 'group'=>'alt_address',
356 'comment' => 'Country for alternate address',
357 'merge_filter' => 'enabled',
361 'name' => 'assistant',
362 'vname' => 'LBL_ASSISTANT',
365 'unified_search' => true,
366 'comment' => 'Name of the assistant of the contact',
367 'merge_filter' => 'enabled',
371 'name' => 'assistant_phone',
372 'vname' => 'LBL_ASSISTANT_PHONE',
374 'dbType' => 'varchar',
376 'group'=>'assistant',
377 'unified_search' => true,
378 'comment' => 'Phone number of the assistant of the contact',
379 'merge_filter' => 'enabled',
381 'email_addresses_primary' =>
383 'name' => 'email_addresses_primary',
385 'relationship' => strtolower($object_name).'_email_addresses_primary',
386 'source' => 'non-db',
387 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
388 'duplicate_merge' => 'disabled',
392 'name' => 'email_addresses',
394 'relationship' => strtolower($object_name).'_email_addresses',
395 'source' => 'non-db',
396 'vname' => 'LBL_EMAIL_ADDRESSES',
398 'unified_search' => true,
399 'rel_fields' => array('primary_address' => array('type'=>'bool')),
402 'relationships'=>array(
403 strtolower($module).'_email_addresses' =>
405 'lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
406 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
407 'relationship_type'=>'many-to-many',
408 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
409 'relationship_role_column'=>'bean_module',
410 'relationship_role_column_value'=>$module
412 strtolower($module).'_email_addresses_primary' =>
413 array('lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
414 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
415 'relationship_type'=>'many-to-many',
416 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
417 'relationship_role_column'=>'primary_address',
418 'relationship_role_column_value'=>'1'