Hi everybody
I just started using SugarCRM. I need to expand User's first name and last name length. How to expand it? I use utf-8 for Thai which need 4 times expanded from original, and last name in Thai often longer than English.![]()
Hi everybody
I just started using SugarCRM. I need to expand User's first name and last name length. How to expand it? I use utf-8 for Thai which need 4 times expanded from original, and last name in Thai often longer than English.![]()
Hi vacharaphol
What is the ideal first_name and last_name length?
If both would be greater than 30 (default value) you can create an extended vardefs for Users module: custom/Extension/modules/Users/Ext/Vardefs/vardefs.ext.php
Inside this file you can add the lines:
$dictionary['User']['fields']['first_name']['len'] = 'the ideal value';
$dictionary['User']['fields']['last_name']['len'] = 'the ideal value';
Save it and go to Admin -> Repair -> Rebuild Extension / Repair Database
Then you need to open the file modules/Users/EditView.html, look for the fields first_name and last_name and update the maxlength and size for both.
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.
Sorry! Andopes...
I cannot find anything under folder custom. I use SugarCE-Full-5.1.0. I found vardefs.php in modules\Users\. Can we edit that file and rebuild database?
First name length in Thai may up to 30 characters. So, database should be 30 x 4 = 120 bytes (because UTF-8 use 4 bytes per character in Thai) and last name length may up to 50 characters => 50 x 4 = 200 bytes length.
I can expand data field in MySQL, but I cannot find the code which trucate the string which contain character longer than 30 bytes.
Please tell me the code that trucate string length.
Last edited by vacharaphol; 2008-10-15 at 04:29 AM. Reason: miss something
Hi vacharaphol
You need to create all these folder and the file. This is the upgrade safe way to modify the length of a field and anything else regarding modules vardefs.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks