Results 1 to 4 of 4

Thread: Custom Field (Users)

  1. #1
    Anahi is offline Member
    Join Date
    Jun 2008
    Posts
    9

    Default Custom Field (Users)

    Hi People, I have this problem:
    I created a custom field relate to Users. It created the following things in the database:

    Table: fields_meta_data
    Row1: Opportunitiesresponsablecomercial_c, responsablecomercial_c, LBL_RESPONSABLECOMERCIAL, Responsable Comercial, Responsable Comercial, Opportunities, relate, 255, 1, NULL, 2008-09-10 20:44:21.000, 0, 0, 0, 0, 0, NULL, Users, user_id_c, NULL
    Row2: Opportunitiesuser_id_c, user_id_c, LBL_LIST_RELATED_TO, NULL, NULL, Opportunities, id, 36, 0, NULL, 2008-06-30 20:02:49.000, 0, 0, 0, 0, 0, NULL
    Table: opportunities_cstm
    Column1: user_id_c
    Column2: responsablecomercial_c

    I added this custom field in the Opportunities module. I can save a user in this field, but I've not been able to use this field in the Advanced Search of the Opportunities. When I select a user there and press Search, it gives an error: SQL Error : Invalid column name 'responsablecomercial_c'.
    What I did is to check which the query is executed when I press Search, and the query is looking for the responsablecomercial_c column in the opportunities table (opportunities.responsablecomercial_c like ...).

    Could anyone help me with this problem?

    Thanks a lot,

  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: Custom Field (Users)

    Hi Anahi

    Add the attached file into modules/Users/metadata/
    Then go to Admin -> Studio -> Users -> Fields
    Create the required fields and add the fields into layout editing the modules/Users/EditView.html and modules/Users/DetailView.html

    Cheers
    Attached Files Attached Files
    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
    Anahi is offline Member
    Join Date
    Jun 2008
    Posts
    9

    Default Re: Custom Field (Users)

    Hi Andre, thanks for you answer.
    If I want to create de field in the Opportunities module, will I need to save the studio.php file into modules/Opportunities/metadata/?
    And then, the field which I will create should be relate to Users module?
    Thanks,

  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: Custom Field (Users)

    Hi Anahi

    It is not necessary. You can normally create custom fields in Opportunities module.
    By default the Users module is not available into dropdown option for creating a relate field, so you can add the option into record_type_display dropdown into include/language/en_us.lang.php:

    PHP Code:
        'Users' => 'Users'
    You can remove this entry after creating the custom field.

    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. Delete custom field but label not delete
    By danchua in forum Help
    Replies: 5
    Last Post: 2009-06-23, 04:27 PM
  2. Activities custom field
    By wfrohwein in forum Developer Help
    Replies: 0
    Last Post: 2008-07-21, 07:51 PM
  3. Add a custom field to a formbase, like ContactFormBase
    By Barlow in forum Developer Help
    Replies: 0
    Last Post: 2008-07-09, 08:44 PM
  4. 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

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
  •