How can I make the field "Opportunity Name" a drop down. We have limited opportunities and would like the consistant.
How can I make the field "Opportunity Name" a drop down. We have limited opportunities and would like the consistant.
Try this:
1. Define your drop down list via the Drop Down editor in the Admin control panel. For our example, we'll assume you've named it: opp_name_dom
2. Create a PHP file name vardefs.ext.php and put the following code in it:
<?php
$dictionary['Opportunity']['fields']['name']['type']='enum';
$dictionary['Opportunity']['fields']['name']['options']='opp_name_dom';
?>
3. Save the new PHP file to <sugar>/custom/Extension/modules/Opportunities/Ext/Vardefs. If the directory structure does not exist, create it manually, making sure that the web user has permissions to it.
4. Do a Quick Rebuild & Repair on the Opportunities via the Repair option in the Admin control panel.
Regards,
Angel Magaña
Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
Blog: http://cheleguanaco.blogspot.com.
Twitter: @cheleguanaco.
________
| Projects: |_____________________________________
|
| CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
| GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
| CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
| Round Robin Leads Assignment
| Phone Number Formatter
| CaseTwit (Twitter Integration)
______________________________________________
That worked perfect! Thank you VERY much.
Thanks,
Skip
that worked except for when you convert a lead and use the checkbox for opportunity......the dropdown doesn't show up there......any ideas?
That makes sense. Two different templates are used for the two various actions, hence the difference you notice.
I'll take a look at it in a few and post later, but as far as I know, there is no upgrade safe way of modifying that template.
[EDIT]
Looks like you'll want to make the edit in:
function getWideFormBody() in the <sugar>/modules/Opportunities/OpportunityFormBase.php file.
Just want to stress that as far as I know, there is no way of doing this in an upgrade-safe manner.
Last edited by Angel; 2009-09-30 at 12:23 AM.
Regards,
Angel Magaña
Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
Blog: http://cheleguanaco.blogspot.com.
Twitter: @cheleguanaco.
________
| Projects: |_____________________________________
|
| CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
| GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
| CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
| Round Robin Leads Assignment
| Phone Number Formatter
| CaseTwit (Twitter Integration)
______________________________________________
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Hi, I'm trying to change the dropdown for opportunity names as well. I was able to create the dropdown and change the code in OpportunityFormBase.php in order to have the dropdown show up when converting a lead to an opportunity. The problem I'm having now is that when it saves, it doesn't save the opportunity name I chose from the dropdown. I get this message when I save the form:
- Used an existing contact - Sample COMPANY
- Used an existing account - Sample Company
- Created a new opportunity -
As you can see, opportunity is blank. So I have to go into that opportunity and choose a name and save it to get it to show up properly. I've been through OpportunityFormBase.php to see where I need to make changes, but I only know some basic PHP so I'm a bit lost. Any help would be much appreciated! Thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks