2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM 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 ********************************************************************************/
38 $dictionary['Prospect'] = array(
40 'table' => 'prospects',
42 'tracker_key' => array (
43 'name' => 'tracker_key',
44 'vname' => 'LBL_TRACKER_KEY',
48 'auto_increment' => true,
49 'importable' => 'false',
50 'studio' => array('editview' => false),
54 'name' => 'birthdate',
55 'vname' => 'LBL_BIRTHDATE',
56 'massupdate' => false,
61 'name' => 'do_not_call',
62 'vname' => 'LBL_DO_NOT_CALL',
71 'vname'=>'LBL_LEAD_ID',
75 'name' => 'account_name',
76 'vname' => 'LBL_ACCOUNT_NAME',
82 'name' => 'campaign_id',
83 'comment' => 'Campaign that generated lead',
84 'vname'=>'LBL_CAMPAIGN_ID',
86 'id_name' => 'campaign_id',
88 'table' => 'campaigns',
90 'module' => 'Campaigns',
93 'massupdate' => false,
94 'duplicate_merge'=> 'disabled',
98 'name' => 'email_addresses',
100 'relationship' => 'prospects_email_addresses',
101 'source' => 'non-db',
102 'vname' => 'LBL_EMAIL_ADDRESSES',
104 'rel_fields' => array('primary_address' => array('type'=>'bool')),
106 'email_addresses_primary' =>
108 'name' => 'email_addresses_primary',
110 'relationship' => 'prospects_email_addresses_primary',
111 'source' => 'non-db',
112 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
113 'duplicate_merge'=> 'disabled',
117 'name' => 'campaigns',
119 'relationship' => 'prospect_campaign_log',
120 'module'=>'CampaignLog',
121 'bean_name'=>'CampaignLog',
123 'vname'=>'LBL_CAMPAIGNLOG',
127 'name' => 'prospect_lists',
129 'relationship' => 'prospect_list_prospects',
130 'module'=>'ProspectLists',
132 'vname'=>'LBL_PROSPECT_LIST',
138 'relationship' => 'prospect_calls',
139 'source' => 'non-db',
140 'vname' => 'LBL_CALLS',
144 'name' => 'meetings',
146 'relationship' => 'prospect_meetings',
147 'source' => 'non-db',
148 'vname' => 'LBL_MEETINGS',
154 'relationship' => 'prospect_notes',
155 'source' => 'non-db',
156 'vname' => 'LBL_NOTES',
162 'relationship' => 'prospect_tasks',
163 'source' => 'non-db',
164 'vname' => 'LBL_TASKS',
170 'relationship' => 'emails_prospects_rel',
171 'source' => 'non-db',
172 'vname' => 'LBL_EMAILS',
179 'name' => 'prospect_auto_tracker_key' ,
181 'fields'=>array('tracker_key')
183 array( 'name' => 'idx_prospects_last_first',
192 'name' => 'idx_prospecs_del_last',
201 'relationships' => array (
202 'prospect_tasks' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
203 'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
204 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
205 'relationship_role_column_value'=>'Prospects'),
206 'prospect_notes' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
207 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
208 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
209 'relationship_role_column_value'=>'Prospects'),
210 'prospect_meetings' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
211 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
212 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
213 'relationship_role_column_value'=>'Prospects'),
214 'prospect_calls' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
215 'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
216 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
217 'relationship_role_column_value'=>'Prospects'),
218 'prospect_emails' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
219 'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
220 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
221 'relationship_role_column_value'=>'Prospects'),
222 'prospect_campaign_log' => array(
223 'lhs_module' => 'Prospects',
224 'lhs_table' => 'prospects',
226 'rhs_module' => 'CampaignLog',
227 'rhs_table' => 'campaign_log',
228 'rhs_key' => 'target_id',
229 'relationship_type' =>'one-to-many'
234 VardefManager::createVardef('Prospects','Prospect', array('default', 'assignable',