Results 1 to 5 of 5

Thread: Custom Date Field Default Value

  1. #1
    CMTG is offline Sugar Community Member
    Join Date
    Dec 2006
    Posts
    10

    Default Custom Date Field Default Value

    I created a custom date field with a default value of "-none-", yet it keeps using a default value of 1900-01-01 where I'd like the field to be empty or NULL instead.

    I've inspected the fields_meta_data table and the default_value column says "-none-" like it is supposed to, so where can the 1900-01-01 value be coming from?

    Thanks for any clues.

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

    Default Re: Custom Date Field Default Value

    I believe this value is coming from the date validation in the sugar_3.js javascript, located in <sugar root>/include/javascript/
    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)
    ______________________________________________

  3. #3
    CMTG is offline Sugar Community Member
    Join Date
    Dec 2006
    Posts
    10

    Default Re: Custom Date Field Default Value

    Thanks for the hint, I'll look into it first thing Monday. ;-)

  4. #4
    CMTG is offline Sugar Community Member
    Join Date
    Dec 2006
    Posts
    10

    Default Re: Custom Date Field Default Value

    After some digging, it turned out not be coming from any javascript. It seems to be an issue with MSSQL Server 2005. Sugar is correctly trying to insert an empty string into the database, but the database silently converts it into a valid date. :-(

    I've worked around it by hacking at DynamicFields/DynamicField.php.

  5. #5
    sidh211 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    126

    Default Re: Custom Date Field Default Value

    Hi i am also facing the same issue

    can you plss help me out

    regds
    sid

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2006-06-16, 03:35 AM
  2. Default a custom field to today's date
    By mikekenny in forum Help
    Replies: 0
    Last Post: 2006-01-11, 12:47 PM
  3. 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
  •