Results 1 to 4 of 4

Thread: can we expan last name length

  1. #1
    vacharaphol is offline Junior Member
    Join Date
    Oct 2008
    Posts
    2

    Unhappy can we expan last name length

    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.

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: can we expan last name length

    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.

  3. #3
    vacharaphol is offline Junior Member
    Join Date
    Oct 2008
    Posts
    2

    Unhappy Re: can we expan last name length

    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

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: can we expan last name length

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Field length issue in Company detail
    By worgi in forum Help
    Replies: 1
    Last Post: 2008-05-28, 11:31 AM
  2. Replies: 2
    Last Post: 2007-12-10, 03:54 PM
  3. Changing Varchar length
    By eaho in forum Help
    Replies: 4
    Last Post: 2006-09-05, 07:32 PM
  4. daily schedule with start times and length
    By carlatpg in forum Feature Requests
    Replies: 0
    Last Post: 2005-10-12, 08:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •