Results 1 to 7 of 7

Thread: Create default value for Expected Close Date Field

  1. #1
    grecstar is offline Member
    Join Date
    Jun 2009
    Posts
    13

    Default Create default value for Expected Close Date Field

    Hello I'd like to create a specific default date for the Expected Close date required field in Opportunities.
    Any idea? I am an extreme newbie, so please detail all steps and files to edit.
    thank you

  2. #2
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: Create default value for Expected Close Date Field

    Hi

    Use view.edit.php to fill default value for the fields in edit view.

    Copy modules\Opportunities\views\view.edit.php to custom\modules\Opportunities\views\view.edit.php and make the changes.

  3. #3
    grecstar is offline Member
    Join Date
    Jun 2009
    Posts
    13

    Default Re: Create default value for Expected Close Date Field

    thanks for your response, ok I copied the file and am ready to edit...
    What is the syntax for creating a default value in the view.edit.php file? I don't see any other default values in this file that I can copy the syntax
    thank you

  4. #4
    sandeeplakshmi is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    bangalore,India
    Posts
    20

    Default Re: Create default value for Expected Close Date Field

    Add a small script to the js section in the view.edit.php

    var today = new Date();
    document.getElementsByName('date_closed')[0].value = '0'+today.getMonth()+'/0'+today.getDay()+''+today.getFullYear();


    you need to work on the date function to get proper format of the date to be filled in the date closed section.


    -Sandeep Lakshmi
    Be hungry!! Be Foolish!!!

  5. #5
    grecstar is offline Member
    Join Date
    Jun 2009
    Posts
    13

    Smile Re: Create default value for Expected Close Date Field

    Thanks Sandeep! I've made this work. You've saved me once again!
    You have my vote for President if you choose to run.

  6. #6
    sandeeplakshmi is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    bangalore,India
    Posts
    20

    Default Re: Create default value for Expected Close Date Field

    I am from INDIA and i cannot do that. anyways many thanks for your appreciation!!!

    -Sandeep Lakshmi
    Be Hungry!! Be Foolish!!!

  7. #7
    epurple is offline Sugar Community Member
    Join Date
    Jan 2011
    Posts
    10

    Default Re: Create default value for Expected Close Date Field

    I must be stupid, but didnt work for me

    where exactly should i insert the "today" lines of code? i tried few places but no luck...

    thanks

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 2008-07-24, 08:07 PM
  2. Custom Date Field Default Value
    By CMTG in forum Help
    Replies: 4
    Last Post: 2008-06-02, 05:30 AM
  3. Replies: 1
    Last Post: 2007-12-14, 08:07 AM
  4. set default value of date field
    By aheuermann in forum Help
    Replies: 0
    Last Post: 2006-07-25, 06:22 PM
  5. "expected close date"
    By pen in forum Feature Requests
    Replies: 1
    Last Post: 2004-08-12, 05:26 AM

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
  •