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-2011 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 'link' => true, // bug 39288
45 'dbType' => 'varchar',
46 'vname' => 'LBL_NAME',
48 'comment' => 'Name of the Company',
49 'unified_search' => true,
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 'comment' => 'The fax phone number of this company',
96 'billing_address_street' =>
98 'name' => 'billing_address_street',
99 'vname' => 'LBL_BILLING_ADDRESS_STREET',
102 'comment' => 'The street address used for billing address',
103 'group'=>'billing_address',
104 'merge_filter' => 'enabled',
106 'billing_address_street_2' =>
108 'name' => 'billing_address_street_2',
109 'vname' => 'LBL_BILLING_ADDRESS_STREET_2',
114 'billing_address_street_3' =>
116 'name' => 'billing_address_street_3',
117 'vname' => 'LBL_BILLING_ADDRESS_STREET_3',
122 'billing_address_street_4' =>
124 'name' => 'billing_address_street_4',
125 'vname' => 'LBL_BILLING_ADDRESS_STREET_4',
130 'billing_address_city' =>
132 'name' => 'billing_address_city',
133 'vname' => 'LBL_BILLING_ADDRESS_CITY',
136 'comment' => 'The city used for billing address',
137 'group'=>'billing_address',
138 'merge_filter' => 'enabled',
140 'billing_address_state' =>
142 'name' => 'billing_address_state',
143 'vname' => 'LBL_BILLING_ADDRESS_STATE',
146 'group'=>'billing_address',
147 'comment' => 'The state used for billing address',
148 'merge_filter' => 'enabled',
150 'billing_address_postalcode' =>
152 'name' => 'billing_address_postalcode',
153 'vname' => 'LBL_BILLING_ADDRESS_POSTALCODE',
156 'group'=>'billing_address',
157 'comment' => 'The postal code used for billing address',
158 'merge_filter' => 'enabled',
161 'billing_address_country' =>
163 'name' => 'billing_address_country',
164 'vname' => 'LBL_BILLING_ADDRESS_COUNTRY',
166 'group'=>'billing_address',
167 'comment' => 'The country used for the billing address',
168 'merge_filter' => 'enabled',
173 'vname' => 'LBL_RATING',
176 'comment' => 'An arbitrary rating for this company for use in comparisons with others',
180 'name' => 'phone_office',
181 'vname' => 'LBL_PHONE_OFFICE',
183 'dbType' => 'varchar',
186 'unified_search' => true,
187 'comment' => 'The office phone number',
188 'merge_filter' => 'enabled',
192 'name' => 'phone_alternate',
193 'vname' => 'LBL_PHONE_ALT',
195 'group'=>'phone_office',
196 'dbType' => 'varchar',
198 'unified_search' => true,
199 'comment' => 'An alternate phone number',
200 'merge_filter' => 'enabled',
205 'vname' => 'LBL_WEBSITE',
207 'dbType' => 'varchar',
209 'comment' => 'URL of website for the company',
213 'name' => 'ownership',
214 'vname' => 'LBL_OWNERSHIP',
221 'name' => 'employees',
222 'vname' => 'LBL_EMPLOYEES',
225 'comment' => 'Number of employees, varchar to accomodate for both number (100) or range (50-100)',
229 'name' => 'ticker_symbol',
230 'vname' => 'LBL_TICKER_SYMBOL',
233 'comment' => 'The stock trading (ticker) symbol for the company',
234 'merge_filter' => 'enabled',
236 'shipping_address_street' =>
238 'name' => 'shipping_address_street',
239 'vname' => 'LBL_SHIPPING_ADDRESS_STREET',
242 'group'=>'shipping_address',
243 'comment' => 'The street address used for for shipping purposes',
244 'merge_filter' => 'enabled',
246 'shipping_address_street_2' =>
248 'name' => 'shipping_address_street_2',
249 'vname' => 'LBL_SHIPPING_ADDRESS_STREET_2',
254 'shipping_address_street_3' =>
256 'name' => 'shipping_address_street_3',
257 'vname' => 'LBL_SHIPPING_ADDRESS_STREET_3',
262 'shipping_address_street_4' =>
264 'name' => 'shipping_address_street_4',
265 'vname' => 'LBL_SHIPPING_ADDRESS_STREET_4',
270 'shipping_address_city' =>
272 'name' => 'shipping_address_city',
273 'vname' => 'LBL_SHIPPING_ADDRESS_CITY',
276 'group'=>'shipping_address',
277 'comment' => 'The city used for the shipping address',
278 'merge_filter' => 'enabled',
280 'shipping_address_state' =>
282 'name' => 'shipping_address_state',
283 'vname' => 'LBL_SHIPPING_ADDRESS_STATE',
286 'group'=>'shipping_address',
287 'comment' => 'The state used for the shipping address',
288 'merge_filter' => 'enabled',
290 'shipping_address_postalcode' =>
292 'name' => 'shipping_address_postalcode',
293 'vname' => 'LBL_SHIPPING_ADDRESS_POSTALCODE',
296 'group'=>'shipping_address',
297 'comment' => 'The zip code used for the shipping address',
298 'merge_filter' => 'enabled',
300 'shipping_address_country' =>
302 'name' => 'shipping_address_country',
303 'vname' => 'LBL_SHIPPING_ADDRESS_COUNTRY',
305 'group'=>'shipping_address',
306 'comment' => 'The country used for the shipping address',
307 'merge_filter' => 'enabled',
313 'vname' => 'LBL_EMAIL',
317 'name' => 'getEmailAddressWidget',
320 'source' => 'non-db',
324 'email_addresses_primary' =>
326 'name' => 'email_addresses_primary',
328 'relationship' => strtolower($object_name).'_email_addresses_primary',
329 'source' => 'non-db',
330 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
331 'duplicate_merge' => 'disabled',
336 'name' => 'email_addresses',
338 'relationship' => strtolower($object_name).'_email_addresses',
339 'source' => 'non-db',
340 'vname' => 'LBL_EMAIL_ADDRESSES',
342 'unified_search' => true,
343 'rel_fields' => array('primary_address' => array('type'=>'bool')),
346 'relationships'=>array(
347 strtolower($module).'_email_addresses' =>
349 'lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
350 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
351 'relationship_type'=>'many-to-many',
352 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
353 'relationship_role_column'=>'bean_module',
354 'relationship_role_column_value'=>$module
356 strtolower($module).'_email_addresses_primary' =>
357 array('lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
358 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
359 'relationship_type'=>'many-to-many',
360 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
361 'relationship_role_column'=>'primary_address',
362 'relationship_role_column_value'=>'1'