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,
51 'importable' => 'required',
52 '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.
53 //property value is case insensitive.
56 strtolower($object_name).'_type' =>
58 'name' => strtolower($object_name).'_type',
59 'vname' => 'LBL_TYPE',
61 'options' => strtolower($object_name).'_type_dom',
63 'comment' => 'The Company is of this type',
68 'vname' => 'LBL_INDUSTRY',
70 'options' => 'industry_dom',
72 'comment' => 'The company belongs in this industry',
73 'merge_filter' => 'enabled',
77 'name' => 'annual_revenue',
78 'vname' => 'LBL_ANNUAL_REVENUE',
81 'comment' => 'Annual revenue for this company',
82 'merge_filter' => 'enabled',
86 'name' => 'phone_fax',
89 'dbType' => 'varchar',
91 'unified_search' => true,
92 'comment' => 'The fax phone number of this company',
95 'billing_address_street' =>
97 'name' => 'billing_address_street',
98 'vname' => 'LBL_BILLING_ADDRESS_STREET',
101 'comment' => 'The street address used for billing address',
102 'group'=>'billing_address',
103 'merge_filter' => 'enabled',
105 'billing_address_street_2' =>
107 'name' => 'billing_address_street_2',
108 'vname' => 'LBL_BILLING_ADDRESS_STREET_2',
113 'billing_address_street_3' =>
115 'name' => 'billing_address_street_3',
116 'vname' => 'LBL_BILLING_ADDRESS_STREET_3',
121 'billing_address_street_4' =>
123 'name' => 'billing_address_street_4',
124 'vname' => 'LBL_BILLING_ADDRESS_STREET_4',
129 'billing_address_city' =>
131 'name' => 'billing_address_city',
132 'vname' => 'LBL_BILLING_ADDRESS_CITY',
135 'comment' => 'The city used for billing address',
136 'group'=>'billing_address',
137 'merge_filter' => 'enabled',
139 'billing_address_state' =>
141 'name' => 'billing_address_state',
142 'vname' => 'LBL_BILLING_ADDRESS_STATE',
145 'group'=>'billing_address',
146 'comment' => 'The state used for billing address',
147 'merge_filter' => 'enabled',
149 'billing_address_postalcode' =>
151 'name' => 'billing_address_postalcode',
152 'vname' => 'LBL_BILLING_ADDRESS_POSTALCODE',
155 'group'=>'billing_address',
156 'comment' => 'The postal code used for billing address',
157 'merge_filter' => 'enabled',
160 'billing_address_country' =>
162 'name' => 'billing_address_country',
163 'vname' => 'LBL_BILLING_ADDRESS_COUNTRY',
165 'group'=>'billing_address',
166 'comment' => 'The country used for the billing address',
167 'merge_filter' => 'enabled',
172 'vname' => 'LBL_RATING',
175 'comment' => 'An arbitrary rating for this company for use in comparisons with others',
179 'name' => 'phone_office',
180 'vname' => 'LBL_PHONE_OFFICE',
182 'dbType' => 'varchar',
185 'unified_search' => true,
186 'comment' => 'The office phone number',
187 'merge_filter' => 'enabled',
191 'name' => 'phone_alternate',
192 'vname' => 'LBL_PHONE_ALT',
194 'group'=>'phone_office',
195 'dbType' => 'varchar',
197 'unified_search' => true,
198 'comment' => 'An alternate phone number',
199 'merge_filter' => 'enabled',
204 'vname' => 'LBL_WEBSITE',
206 'dbType' => 'varchar',
208 'comment' => 'URL of website for the company',
212 'name' => 'ownership',
213 'vname' => 'LBL_OWNERSHIP',
220 'name' => 'employees',
221 'vname' => 'LBL_EMPLOYEES',
224 'comment' => 'Number of employees, varchar to accomodate for both number (100) or range (50-100)',
228 'name' => 'ticker_symbol',
229 'vname' => 'LBL_TICKER_SYMBOL',
232 'comment' => 'The stock trading (ticker) symbol for the company',
233 'merge_filter' => 'enabled',
235 'shipping_address_street' =>
237 'name' => 'shipping_address_street',
238 'vname' => 'LBL_SHIPPING_ADDRESS_STREET',
241 'group'=>'shipping_address',
242 'comment' => 'The street address used for for shipping purposes',
243 'merge_filter' => 'enabled',
245 'shipping_address_street_2' =>
247 'name' => 'shipping_address_street_2',
248 'vname' => 'LBL_SHIPPING_ADDRESS_STREET_2',
253 'shipping_address_street_3' =>
255 'name' => 'shipping_address_street_3',
256 'vname' => 'LBL_SHIPPING_ADDRESS_STREET_3',
261 'shipping_address_street_4' =>
263 'name' => 'shipping_address_street_4',
264 'vname' => 'LBL_SHIPPING_ADDRESS_STREET_4',
269 'shipping_address_city' =>
271 'name' => 'shipping_address_city',
272 'vname' => 'LBL_SHIPPING_ADDRESS_CITY',
275 'group'=>'shipping_address',
276 'comment' => 'The city used for the shipping address',
277 'merge_filter' => 'enabled',
279 'shipping_address_state' =>
281 'name' => 'shipping_address_state',
282 'vname' => 'LBL_SHIPPING_ADDRESS_STATE',
285 'group'=>'shipping_address',
286 'comment' => 'The state used for the shipping address',
287 'merge_filter' => 'enabled',
289 'shipping_address_postalcode' =>
291 'name' => 'shipping_address_postalcode',
292 'vname' => 'LBL_SHIPPING_ADDRESS_POSTALCODE',
295 'group'=>'shipping_address',
296 'comment' => 'The zip code used for the shipping address',
297 'merge_filter' => 'enabled',
299 'shipping_address_country' =>
301 'name' => 'shipping_address_country',
302 'vname' => 'LBL_SHIPPING_ADDRESS_COUNTRY',
304 'group'=>'shipping_address',
305 'comment' => 'The country used for the shipping address',
306 'merge_filter' => 'enabled',
312 'vname' => 'LBL_EMAIL',
316 'name' => 'getEmailAddressWidget',
319 'source' => 'non-db',
320 'studio' => array('editField' => true, 'searchview' => false),
323 'email_addresses_primary' =>
325 'name' => 'email_addresses_primary',
327 'relationship' => strtolower($object_name).'_email_addresses_primary',
328 'source' => 'non-db',
329 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
330 'duplicate_merge' => 'disabled',
335 'name' => 'email_addresses',
337 'relationship' => strtolower($object_name).'_email_addresses',
338 'source' => 'non-db',
339 'vname' => 'LBL_EMAIL_ADDRESSES',
341 'unified_search' => true,
342 'rel_fields' => array('primary_address' => array('type'=>'bool')),
345 'relationships'=>array(
346 strtolower($module).'_email_addresses' =>
348 'lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
349 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
350 'relationship_type'=>'many-to-many',
351 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
352 'relationship_role_column'=>'bean_module',
353 'relationship_role_column_value'=>$module
355 strtolower($module).'_email_addresses_primary' =>
356 array('lhs_module'=> $module, 'lhs_table'=> strtolower($module), 'lhs_key' => 'id',
357 'rhs_module'=> 'EmailAddresses', 'rhs_table'=> 'email_addresses', 'rhs_key' => 'id',
358 'relationship_type'=>'many-to-many',
359 'join_table'=> 'email_addr_bean_rel', 'join_key_lhs'=>'bean_id', 'join_key_rhs'=>'email_address_id',
360 'relationship_role_column'=>'primary_address',
361 'relationship_role_column_value'=>'1'