Can I change a field after an initial list import, from a text field to a drop-down field? If so, how might that be accomplished?
Can I change a field after an initial list import, from a text field to a drop-down field? If so, how might that be accomplished?
Phillip Crum
Chief Idea Officer
MarketingMeasure/Sir Speedy Printing and Marketing Services
Dallas, TX 75229
pcrum@MarketingMeasure.com
http://www.MarketingMeasure.com
Hi Phillip
You can create an extended vardefs: custom/Extension/modules/<ModuleName>/Ext/Vardefs/vardefs.ext.php
Into this file update the attribute which defines the type of the current field.
Save this file (I believe you need to create the folders and the file), go to Admin -> RepairPHP Code:$dictionary[<ClassName>]['fields'][]<FieldName>['type'] = 'varchar';
And click on "Rebuild Extension" and "Repair Database"
This way the field will be automatically altered from dropdown to varchar.
Cheers
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.
Thank you!
Phillip Crum
Chief Idea Officer
MarketingMeasure/Sir Speedy Printing and Marketing Services
Dallas, TX 75229
pcrum@MarketingMeasure.com
http://www.MarketingMeasure.com
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks