Results 1 to 2 of 2

Thread: MultiSelect - Save

  1. #1
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default MultiSelect - Save

    I've run into an interesting situation and wondered if anyone has some insight that might help.

    Using 5.0.c on MySQL, I've got a very basic custom module with 3 fields on it: TextField, TextArea and a MultiSelect.

    It appears as though there is a bug in the Save function for Sugar that causes the selected values of the MultiSelect field to be be truncated at 100 chars. Thus if I select 10 values that are 11 characters in length, it doesn't save all of them. The problem is further complicated by the fact that a delimiter is added to the values before they are committed to the database, further reducing the number of values one can select.

    I was checking out SugarBean.php to see if I could spot something obvious in the Save() function that would cause it to truncate, but I don't see anything yet.

    Anyone have some insight that might help?
    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)
    ______________________________________________

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: MultiSelect - Save

    Never mind, I found the source of the problem.

    Turns out that vardefs.php had the length of that field set to 100, although one is not allowed to set that value when the field is defined.

    Changing it to 500 by directly editing vardefs.php in my custom module fixed it.
    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)
    ______________________________________________

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cancel save in logic hook
    By eggsurplus in forum Developer Help
    Replies: 4
    Last Post: 2012-02-08, 09:37 AM
  2. Como personalizar boton Save
    By arffup in forum Español
    Replies: 4
    Last Post: 2009-07-28, 04:20 PM
  3. New relation added on every save
    By gunni in forum Developer Help
    Replies: 6
    Last Post: 2008-08-12, 01:35 AM
  4. save a variable to sugarcrm database after logic_hooks
    By shahrzad.khorrami in forum Developer Help
    Replies: 3
    Last Post: 2008-07-09, 07:17 AM
  5. customaking save action
    By arffup in forum Developer Help
    Replies: 0
    Last Post: 2008-04-04, 10:19 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
  •