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.
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.
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
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
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.
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.
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 ********************************************************************************/
44 'dbType' => 'varchar',
45 'vname' => 'LBL_NAME',
47 'comment' => 'Name of the Company',
48 'unified_search' => true,
49 'full_text_search' => array('boost' => 3),
52 'importable' => 'required',
53 'merge_filter' => 'selected', //field will be enabled for merge and will be a part of the default search criteria..other valid values for this property are enabled and disabled, default value is disabled.
54 //property value is case insensitive.
57 strtolower($object_name).'_type' =>
59 'name' => strtolower($object_name).'_type',
60 'vname' => 'LBL_TYPE',
62 'options' => strtolower($object_name).'_type_dom',
64 'comment' => 'The Company is of this type',
69 'vname' => 'LBL_INDUSTRY',
71 'options' => 'industry_dom',
73 'comment' => 'The company belongs in this industry',
74 'merge_filter' => 'enabled',
78 'name' => 'annual_revenue',
79 'vname' => 'LBL_ANNUAL_REVENUE',
82 'comment' => 'Annual revenue for this company',
83 'merge_filter' => 'enabled',
87 'name' => 'phone_fax',
90 'dbType' => 'varchar',
92 'unified_search' => true,
93 'full_text_search' => array('boost' => 1),
94 'comment' => 'The fax phone number of this company',
97 'billing_address_street' =>
99 'name' => 'billing_address_street',
100 'vname' => 'LBL_BILLING_ADDRESS_STREET',
103 'comment' => 'The street address used for billing address',
104 'group'=>'billing_address',
105 'merge_filter' => 'enabled',
107 'billing_address_street_2' =>
109 'name' => 'billing_address_street_2',
110 'vname' => 'LBL_BILLING_ADDRESS_STREET_2',
115 'billing_address_street_3' =>
117 'name' => 'billing_address_street_3',
118 'vname' => 'LBL_BILLING_ADDRESS_STREET_3',
123 'billing_address_street_4' =>
125 'name' => 'billing_address_street_4',
126 'vname' => 'LBL_BILLING_ADDRESS_STREET_4',
131 'billing_address_city' =>
133 'name' => 'billing_address_city',
134 'vname' => 'LBL_BILLING_ADDRESS_CITY',
137 'comment' => 'The city used for billing address',
138 'group'=>'billing_address',
139 'merge_filter' => 'enabled',
141 'billing_address_state' =>
143 'name' => 'billing_address_state',
144 'vname' => 'LBL_BILLING_ADDRESS_STATE',
147 'group'=>'billing_address',
148 'comment' => 'The state used for billing address',
149 'merge_filter' => 'enabled',
151 'billing_address_postalcode' =>
153 'name' => 'billing_address_postalcode',
154 'vname' => 'LBL_BILLING_ADDRESS_POSTALCODE',
157 'group'=>'billing_address',
158 'comment' => 'The postal code used for billing address',
159 'merge_filter' => 'enabled',
162 'billing_address_country' =>
164 'name' => 'billing_address_country',
165 'vname' => 'LBL_BILLING_ADDRESS_COUNTRY',
167 'group'=>'billing_address',
168 'comment' => 'The country used for the billing address',
169 'merge_filter' => 'enabled',
174 'vname' => 'LBL_RATING',
177 'comment' => 'An arbitrary rating for this company for use in comparisons with others',
181 'name' => 'phone_office',
182 'vname' => 'LBL_PHONE_OFFICE',
184 'dbType' => 'varchar',
187 'unified_search' => true,
188 'full_text_search' => array('boost' => 1),
189 'comment' => 'The office phone number',
190 'merge_filter' => 'enabled',
194 'name' => 'phone_alternate',
195 'vname' => 'LBL_PHONE_ALT',
197 'group'=>'phone_office',
198 'dbType' => 'varchar',
200 'unified_search' => true,
201 'full_text_search' => array('boost' => 1),
202 'comment' => 'An alternate phone number',
203 'merge_filter' => 'enabled',
208 'vname' => 'LBL_WEBSITE',
210 'dbType' => 'varchar',
212 'comment' => 'URL of website for the company',
216 'name' => 'ownership',
217 'vname' => 'LBL_OWNERSHIP',
224 'name' => 'employees',
225 'vname' => 'LBL_EMPLOYEES',
228 'comment' => 'Number of employees, varchar to accomodate for both number (100) or range (50-100)',
232 'name' => 'ticker_symbol',
233 'vname' => 'LBL_TICKER_SYMBOL',
236 'comment' => 'The stock trading (ticker) symbol for the company',
237 'merge_filter' => 'enabled',
239 'shipping_address_street' =>
241 'name' => 'shipping_address_street',
242 'vname' => 'LBL_SHIPPING_ADDRESS_STREET',
245 'group'=>'shipping_address',
246 'comment' => 'The street address used for for shipping purposes',
247 'merge_filter' => 'enabled',
249 'shipping_address_street_2' =>
251 'name' => 'shipping_address_street_2',
252 'vname' => 'LBL_SHIPPING_ADDRESS_STREET_2',
257 'shipping_address_street_3' =>
259 'name' => 'shipping_address_street_3',
260 'vname' => 'LBL_SHIPPING_ADDRESS_STREET_3',
265 'shipping_address_street_4' =>
267 'name' => 'shipping_address_street_4',
268 'vname' => 'LBL_SHIPPING_ADDRESS_STREET_4',
273 'shipping_address_city' =>
275 'name' => 'shipping_address_city',
276 'vname' => 'LBL_SHIPPING_ADDRESS_CITY',
279 'group'=>'shipping_address',
280 'comment' => 'The city used for the shipping address',
281 'merge_filter' => 'enabled',
283 'shipping_address_state' =>
285 'name' => 'shipping_address_state',
286 'vname' => 'LBL_SHIPPING_ADDRESS_STATE',
289 'group'=>'shipping_address',
290 'comment' => 'The state used for the shipping address',
291 'merge_filter' => 'enabled',
293 'shipping_address_postalcode' =>
295 'name' => 'shipping_address_postalcode',
296 'vname' => 'LBL_SHIPPING_ADDRESS_POSTALCODE',
299 'group'=>'shipping_address',
300 'comment' => 'The zip code used for the shipping address',
301 'merge_filter' => 'enabled',
303 'shipping_address_country' =>
305 'name' => 'shipping_address_country',
306 'vname' => 'LBL_SHIPPING_ADDRESS_COUNTRY',
308 'group'=>'shipping_address',
309 'comment' => 'The country used for the shipping address',
310 'merge_filter' => 'enabled',
316 'vname' => 'LBL_EMAIL',
320 'name' => 'getEmailAddressWidget',
323 'source' => 'non-db',
324 'studio' => array('editField' => true, 'searchview' => false),
327 'email_addresses_primary' =>
329 'name' => 'email_addresses_primary',
331 'relationship' => strtolower($object_name).'_email_addresses_primary',
332 'source' => 'non-db',
333 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
334 'duplicate_merge' => 'disabled',
339 'name' => 'email_addresses',
341 'relationship' => strtolower($object_name).'_email_addresses',
342 'source' => 'non-db',
343 'vname' => 'LBL_EMAIL_ADDRESSES',
345 'unified_search' => true,
346 'rel_fields' => array('primary_address' => array('type'=>'bool')),
349 'relationships'=>array(
350 strtolower($module).'_email_addresses' =>
352 'lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
353 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
354 'relationship_type'=>'many-to-many',
355 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
356 'relationship_role_column'=>'bean_module',
357 'relationship_role_column_value'=>$module
359 strtolower($module).'_email_addresses_primary' =>
360 array('lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
361 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
362 'relationship_type'=>'many-to-many',
363 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
364 'relationship_role_column'=>'primary_address',
365 'relationship_role_column_value'=>'1'