Hello
Using Sugar 5.5
I have already applied the steps below to Sugar and they work fine-
But I need to still figure out how to make:
1. Auto Fill the Appointment Box with the Accout Info during the ConvertLead process
2. Change the default radio button from "Call" to "Meeting" for Appointment during the ConvertLead process
I have been trying for days to figure this out, I have tried to modify the CallFormBase.PHP, MeetingFormBase.PHP, and ConvertLead.PHP in several places but I gues I just havent found the magic spot yet. Can you help me figure this one out ?
Here is what I have done so far.....
1. Make the "Create Opportunity" and “Create Appointment” box always checked :
In the Leads/ConvertLead.php file
change the following text bolded items at the bottom of your php file:
Located here
//OPPORTUNITY
.....('FORMBODY',"<h5 class='dataLabel'><input class='checkbox' type='checkbox' name='newopportunity' onClick='toggleDisplay(\"newoppdiv\");'> ".$mod_strings['LNK_NEW_OPPORTUNITY']."</h5><div id='newoppdiv' style='display:none'>".$oppForm->getWideFormBody('Opportunities', 'Opportunities','ConvertLead', $lead , false).....
New Code Is
.....('FORMBODY',"<h5 class='dataLabel'><input class='checkbox' type='checkbox' checked name='newopportunity' onClick='toggleDisplay(\"newoppdiv\");'> ".$mod_strings['LNK_NEW_OPPORTUNITY']."</h5><div id='newoppdiv' style='display:block'>".$oppForm->getWideFormBody('Opportunities', 'Opportunities','ConvertLead', $lead , false).....
And
//APPOINTMENT
.....('FORMBODY',"<h5 class='dataLabel'><input class='checkbox' type='checkbox' checked name='newmeeting' onClick='toggleDisplay(\"newmeetingdiv\");'> ".$mod_strings['LNK_NEW_APPOINTMENT']."</h5><div id='newmeetingdiv' style='display:block'>".$callForm->getWideFormBody('Appointments','Calls','Convert Le ad').....
2. Make Expected Close Date Not required :
In Opportunities/OpputunityFormBase.php under the function getWideFormBody()
check for the line :
<td class="dataLabel">$lbl_date_closed <span class="required">$lbl_required_symbol</span></td>
change this to -
<td class="dataLabel">$lbl_date_closed
And
also, in the Opportunities/metadata/editviewdefs.php, in the "panels" array remove 'required'=>true' for the "date_closed" –
old code: array('name'=>'date_closed', 'displayParams'=>array('required'=>true)),
new code: array('name'=>'date_closed', 'displayParams'=>array()),
3. Prefill the Opportunity name with the Account Name :
In Opportunities/OpputunityFormBase.php under the function getWideFormBody()
check for the line:
<td class="dataField"><input name='{$prefix}name' type="text" value="{$lead->opportunity_name}"></td>
change it to:
<td class="dataField"><input name='{$prefix}name' type="text" value="{$lead->account_name}"></td>


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks