Results 1 to 3 of 3

Thread: how to do fields and dropdown mandatory in Sugar

  1. #1
    descarga is offline Junior Member
    Join Date
    Jul 2009
    Posts
    3

    Default how to do fields and dropdown mandatory in Sugar

    Hello, I need your help
    I want to know how to do fields and dropdown mandatory in Sugar.
    I refer to fields predefined by sugar, for example in Cases the field "priority" that it is a dropdown

    Thank You

  2. #2
    jsagar's Avatar
    jsagar is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    Ahmedabad,India
    Posts
    242

    Default Re: how to do fields and dropdown mandatory in Sugar

    for making a field required you need to override the vardef of your module

    Example :
    Create a file in below directory for upgradesafe
    custom/Extension/modules/<YourModule>/Ext/Vardefs/
    anyname.php

    PHP Code:
    $dictionary["Account"]["fields"]["<FieldName>"]['required'] = true
    after it repiar & rebuild cahce & Db, run the query given by the repair Db
    Best Regards
    ---------------------------------------
    Jaydeepsinh Sagar

  3. #3
    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 to do fields and dropdown mandatory in Sugar

    You just need to edit the custom/modules/Cases/metadata/editviewdefs.php

    Go to "priority" field definition and add this attribute:

    PHP Code:
    'displayParams' => array(
      
    'required' => true,
    ), 
    Go to Admin -> Repair -> Quick Repair and Rebuild

    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mandatory fields not working
    By piccirm in forum Help
    Replies: 6
    Last Post: 2009-02-05, 02:46 PM
  2. Relate Fields are mandatory
    By salimmohd82 in forum Help
    Replies: 0
    Last Post: 2008-03-13, 06:02 PM
  3. Replies: 3
    Last Post: 2007-01-05, 07:42 PM
  4. Mandatory Fields
    By vivekselot in forum Help
    Replies: 0
    Last Post: 2006-09-28, 07:22 PM
  5. mandatory fields
    By vinhtran in forum General Discussion
    Replies: 1
    Last Post: 2006-04-04, 02:40 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
  •