Results 1 to 5 of 5

Thread: how can custom default fileds?

  1. #1
    hadasme is offline Member
    Join Date
    Mar 2008
    Posts
    9

    Default how can custom default fileds?

    hi,
    I’m using version 5.0.0b
    I want to edit some of the default fields , for example: I want to edit in the leads tab the lead source and to make the country filed mandatory.
    When i go to the studio , and select the default fields i can't edit it only clone or save it.
    How can i do it?
    Also if i add new filed like 'working model' , and when i use convert lad, i want that this filed will appear in the opportunity and in the account. Can i do this kind of operation?

    thanks
    Hadas

  2. #2
    hadasme is offline Member
    Join Date
    Mar 2008
    Posts
    9

    Default Re: how can custom default fileds?

    Is anyone run into this problem?????
    Hadas

  3. #3
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Lightbulb Re: how can custom default fileds?

    You can do this by changing the vardefs file.

    Remember to change the one in the custom/ directory! so its upgrade safe.

    I forget the exact position but there is a setting where you can specify it to be required. Look in the Accounts/vardef.php or one of the other modules. The last name is a required field. See how they did it there and copy it. You can use the custom directory to extend the standard vardef definition to include the required flag.

    Good luck,

    PAris

    PS I know this has been addressed in a another stream, you should try to search on vardef required. PT

  4. #4
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: how can custom default fileds?

    The line Paris refers to in vardefs.php is

    Code:
    'required'=> true,


    if you add this to a field, it will have to be filled, mandatorily.
    What do you think the cookie monster eats ?

  5. #5
    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: how can custom default fileds?

    You have to create the file:
    custom/modules/YourModule/Ext/Vardefs/vardefs.ext.php

    Inside it you reset the property you want.

    LIke that:

    PHP Code:
    $dictionary['Meeting']['fields']['contact_id_c']['type']   = 'id';
    $dictionary['Meeting']['fields']['contact_id_c']['vname']  = 'LBL_CONTACT_ID_C';
    $dictionary['Meeting']['fields']['contact_id_c']['isnull'] = false;
    $dictionary['Meeting']['fields']['contact_id_c']['module'] = 'Contacts'
    Cheers

    --
    André Lopes
    Lâmpada Global Services
    Rua Bela Cintra, 299 conjunto. 51
    São Paulo, SP 01415-000
    tel1. 55 11 3237-3110
    cel. 55 11 7636-5859
    e-mail: info@lampadacrm.com.br

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. upgraded to 4.5.1e, received "Metadata for table tracker does not exist"
    By sfgeorge in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-09-03, 02:24 PM
  2. Asterisk Patch 1.1.0 Crash on logon
    By skyracer in forum Help
    Replies: 6
    Last Post: 2006-07-08, 06:30 AM
  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
  •