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 ********************************************************************************/
38 $dictionary['Prospect'] = array(
40 'table' => 'prospects',
41 'unified_search' => true,
43 'tracker_key' => array (
44 'name' => 'tracker_key',
45 'vname' => 'LBL_TRACKER_KEY',
49 'auto_increment' => true,
50 'importable' => 'false',
51 'studio' => array('editview' => false),
55 'name' => 'birthdate',
56 'vname' => 'LBL_BIRTHDATE',
57 'massupdate' => false,
62 'name' => 'do_not_call',
63 'vname' => 'LBL_DO_NOT_CALL',
72 'vname'=>'LBL_LEAD_ID',
76 'name' => 'account_name',
77 'vname' => 'LBL_ACCOUNT_NAME',
83 'name' => 'campaign_id',
84 'comment' => 'Campaign that generated lead',
85 'vname'=>'LBL_CAMPAIGN_ID',
87 'id_name' => 'campaign_id',
89 'table' => 'campaigns',
91 'module' => 'Campaigns',
94 'massupdate' => false,
95 'duplicate_merge'=> 'disabled',
99 'name' => 'email_addresses',
101 'relationship' => 'prospects_email_addresses',
102 'source' => 'non-db',
103 'vname' => 'LBL_EMAIL_ADDRESSES',
105 'rel_fields' => array('primary_address' => array('type'=>'bool')),
107 'email_addresses_primary' =>
109 'name' => 'email_addresses_primary',
111 'relationship' => 'prospects_email_addresses_primary',
112 'source' => 'non-db',
113 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY',
114 'duplicate_merge'=> 'disabled',
118 'name' => 'campaigns',
120 'relationship' => 'prospect_campaign_log',
121 'module'=>'CampaignLog',
122 'bean_name'=>'CampaignLog',
124 'vname'=>'LBL_CAMPAIGNLOG',
128 'name' => 'prospect_lists',
130 'relationship' => 'prospect_list_prospects',
131 'module'=>'ProspectLists',
133 'vname'=>'LBL_PROSPECT_LIST',
139 'relationship' => 'prospect_calls',
140 'source' => 'non-db',
141 'vname' => 'LBL_CALLS',
145 'name' => 'meetings',
147 'relationship' => 'prospect_meetings',
148 'source' => 'non-db',
149 'vname' => 'LBL_MEETINGS',
155 'relationship' => 'prospect_notes',
156 'source' => 'non-db',
157 'vname' => 'LBL_NOTES',
163 'relationship' => 'prospect_tasks',
164 'source' => 'non-db',
165 'vname' => 'LBL_TASKS',
171 'relationship' => 'emails_prospects_rel',
172 'source' => 'non-db',
173 'vname' => 'LBL_EMAILS',
180 'name' => 'prospect_auto_tracker_key' ,
182 'fields'=>array('tracker_key')
184 array( 'name' => 'idx_prospects_last_first',
193 'name' => 'idx_prospecs_del_last',
200 array('name' =>'idx_prospects_id_del', 'type'=>'index', 'fields'=>array('id','deleted')),
201 array('name' =>'idx_prospects_assigned', 'type'=>'index', 'fields'=>array('assigned_user_id')),
205 'relationships' => array (
206 'prospect_tasks' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
207 'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
208 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
209 'relationship_role_column_value'=>'Prospects'),
210 'prospect_notes' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
211 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
212 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
213 'relationship_role_column_value'=>'Prospects'),
214 'prospect_meetings' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
215 'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
216 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
217 'relationship_role_column_value'=>'Prospects'),
218 'prospect_calls' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
219 'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
220 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
221 'relationship_role_column_value'=>'Prospects'),
222 'prospect_emails' => array('lhs_module'=> 'Prospects', 'lhs_table'=> 'prospects', 'lhs_key' => 'id',
223 'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
224 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
225 'relationship_role_column_value'=>'Prospects'),
226 'prospect_campaign_log' => array(
227 'lhs_module' => 'Prospects',
228 'lhs_table' => 'prospects',
230 'rhs_module' => 'CampaignLog',
231 'rhs_table' => 'campaign_log',
232 'rhs_key' => 'target_id',
233 'relationship_type' =>'one-to-many'
238 VardefManager::createVardef('Prospects','Prospect', array('default', 'assignable',