Results 1 to 6 of 6

Thread: make field required

  1. #1
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Default make field required

    Hi!
    I'm trying to make a field required i'm adding this lines to /custom/Extension/modules/Notes/Ext/Vardefs/myfile.php

    $dictionary['Note']['fields']['accounts_notes_name']['required'] = true;

    I do repair and rebuild but it doesn't work, any ideas?
    Priscila Kin Yamamoto Joranhezon
    Phone: +55 61 32010000
    priscila.joranhezon@nct.com.br
    NCT Informática Ltda

  2. #2
    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: make field required

    Hi Priscila

    You just need to add the attribute
    PHP Code:
    'displayParams' => array(
      
    'required' => true,
    ), 
    Into field def at editviewdefs.php

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: make field required

    I'm jumping in here I need to make a field that is required not required. The field is account name in the Opportunity module. I tried to simply make a custom metadata editviewsdefs.php to set required as false that hasn't worked I tried to create a custom file to override the vardefs entry for account_name in the vardefs.php of the Opportunity same as above but replacing my feilds for his but that didn't work

    Any idea how I to do this when the field is not created in aooportunity??

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  4. #4
    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: make field required

    Quote Originally Posted by chrislynch8 View Post
    I'm jumping in here I need to make a field that is required not required. The field is account name in the Opportunity module. I tried to simply make a custom metadata editviewsdefs.php to set required as false that hasn't worked I tried to create a custom file to override the vardefs entry for account_name in the vardefs.php of the Opportunity same as above but replacing my feilds for his but that didn't work

    Any idea how I to do this when the field is not created in aooportunity??

    Rgds
    Chris
    Opportunties depends on Accounts. Did you try Admin -> Repair -> Quick Repair and Rebuild after implementing such customization?

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  5. #5
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: make field required

    Hi,

    Ya I tried Repair it, the only way I could get it to work was if I edited the vardefs in /modules/Opportunities/

    When I create the custom file for the vardefs override what must it be called or can it be anything? I have it placed in /custom/....../Ext/Vardefs and I called it vardefs.ext.php

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  6. #6
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Default Re: make field required

    Quote Originally Posted by andopes View Post
    Hi Priscila

    You just need to add the attribute
    PHP Code:
    'displayParams' => array(
      
    'required' => true,
    ), 
    Into field def at editviewdefs.php

    Cheers
    Hi!
    Andopes! Thanks it worked.
    How come it doesn't work just by adding the required=>true on vardefs?

    Priscila Kin Yamamoto Joranhezon
    Phone: +55 61 32010000
    priscila.joranhezon@nct.com.br
    NCT Informática Ltda

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to make a field NOT required
    By kinshibuya in forum Help
    Replies: 9
    Last Post: 2010-12-30, 03:11 PM
  2. How to make a field required via JS
    By Liior in forum Developer Help
    Replies: 2
    Last Post: 2009-06-09, 12:03 PM
  3. How to make default field not required
    By jim.thornton in forum Developer Help
    Replies: 5
    Last Post: 2009-03-19, 09:29 PM
  4. make standard field required
    By antoni in forum Developer Help
    Replies: 5
    Last Post: 2008-11-17, 06:02 PM
  5. Make Account Name a required field
    By MORAND in forum Developer Help
    Replies: 6
    Last Post: 2006-07-20, 09:52 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
  •