Results 1 to 3 of 3

Thread: Creating cstm field: type date, no default value

  1. #1
    gladiorlic is offline Sugar Community Member
    Join Date
    Nov 2006
    Posts
    12

    Default Creating cstm field: type date, no default value

    HI,

    I created a cstm field, type Date. If no date is entered the field should be blank.
    Although i did specify that the default value is 'none', the system inserts the date 1900-01-01.

    How do i bypass this? No dater entry must result in blank field.

  2. #2
    mwallace is offline Junior Member
    Join Date
    Jul 2007
    Posts
    3

    Default Re: Creating cstm field: type date, no default value

    This doesn't happen on my version (4.5.1d). You can try this and maybe it will work with your version. Maybe not! This controls the default behavior for custom date entries that are blank or are 1900-01-01.

    1. Go to sugarcrm\htdocs\sugarcrm\modules\DynamicFields and open DynamicFields.php.

    2. In my version, line 223 has the default behavior for empty custom date fields. Here's what it I have:

    if($field['data_type'] == 'date' && (empty($this->bean->$name )|| $this->bean->$name == '1900-01-01'))
    {
    $this->bean->$name = 'NULL';
    }

    3. See if you have code that is similar to this. Modify it or add it if you don't have anything like it. It changes empty date values and date values of 1900-01-01 to null, which is what you're after.

  3. #3
    umer is offline Member
    Join Date
    Jul 2007
    Posts
    6

    Default Re: Creating cstm field: type date, no default value

    please help me i am using vmware server and i have installed red hat enterprise i am occuring the p roblem of mysql database not available how can i remove this problem my php version is 4-4 and mysql version is 5

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. problemi step 6 di SugarSuite-Full-4.0.1h
    By lucia in forum Italiano
    Replies: 0
    Last Post: 2006-12-27, 08:50 AM
  2. Replies: 1
    Last Post: 2006-10-12, 12:07 AM
  3. 4.0.1 Installation Problem
    By clawton in forum Help
    Replies: 14
    Last Post: 2006-02-13, 04:17 PM
  4. Fatal error: Max
    By spokes2k4 in forum Help
    Replies: 3
    Last Post: 2006-01-15, 03:50 PM
  5. SugarCrm 4.0 Patch
    By mgamboa in forum General Discussion
    Replies: 0
    Last Post: 2005-12-21, 04:14 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
  •