Results 1 to 8 of 8

Thread: Custom Field in Users module

  1. #1
    stonesown is offline Junior Member
    Join Date
    Sep 2008
    Posts
    3

    Default Custom Field in Users module

    Hi, I am using Sugar CE version 5.0.0f and am having trouble figuring out how to add a custom field to the Users module. I created a drop down field in studio called region by loading the opportunities module and then replacing "opportunities" with "users" in the url. This let me create the field using studio but I can't load layouts this way. I recall seeing (can't seem to find it now) a file that can be edited to make the layout visible in studio...does that work? if yes, which file and how do I edit it? if no, can someone please point me to the changes and corresponding files to be manually edited?
    Thanks very much,

    Josh

  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 in Users module

    Hi Josh

    Just copy this file into modules/Users/metadata and go to Admin -> Studio -> Users

    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
    stonesown is offline Junior Member
    Join Date
    Sep 2008
    Posts
    3

    Default Re: Custom Field in Users module

    Thanks, I added the file and I now see users as an option in studio but under layouts I only get listview, quickcreate, and search. Any thoughts on that?

    Thanks,

    Josh

  4. #4
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Custom Field in Users module

    You can't edit the Users module in Studio as it's a non standard module (three columns with the description field in the last column). I know they are working on this internally but for now, you will have to get into the code to add your field to the Detail and Edit views.

    You would have to manually edit EditView and DetailView files in the modules/users directory.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  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: Custom Field in Users module

    Hi Kenneth

    Is there any reason to don´t create the metadata files detailviewdefs.php, editviewdefs.php, listviewdefs.php, searchdefs.php for User and Configurator modules?
    Sugar, as a powerful Frame Work, offers all features to implement the same behavior for these modules!
    I started a customization of these metadata files for Users module. Would it be useful for future patch and releases?

    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.

  6. #6
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Custom Field in Users module

    Quote Originally Posted by andopes
    Hi Kenneth

    Is there any reason to don´t create the metadata files detailviewdefs.php, editviewdefs.php, listviewdefs.php, searchdefs.php for User and Configurator modules?
    Sugar, as a powerful Frame Work, offers all features to implement the same behavior for these modules!
    I started a customization of these metadata files for Users module. Would it be useful for future patch and releases?

    Cheers
    There still are a few modules running in legacy mode. The reasons are many, in the case of the Users module it's because it's a non standard layout that Studio can't manage yet. Like I said they are working on it. Not sure if it's scheduled for 5.5 or 6.0 but I am sure it's on the roadmap.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  7. #7
    stonesown is offline Junior Member
    Join Date
    Sep 2008
    Posts
    3

    Default Re: Custom Field in Users module

    Kenneth:

    Thank you for your response. Can you please:

    1) Confirm that adding the field using Studio (via the studio.php attached in the thread) is a valid/consistent method for creating the field in the database?

    2) Can you be specific about which files need to be edited for the new field to be functional in the edit and detail views? I realize you said the defaultview and editview files but is that all? And is that the html, php, or both? Anything y7ou can say about the edits required?

    I'm sorry if this is an amateurish question but I think this topic has had more than it's share of incomplete responses so it would be good for the record, and also, I'm smart enough to choose a great crm but not smart enough to complete this customisation without help from the experts

    Regards,

    Josh

  8. #8
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Custom Field in Users module

    Quote Originally Posted by stonesown
    Kenneth:

    Thank you for your response. Can you please:

    1) Confirm that adding the field using Studio (via the studio.php attached in the thread) is a valid/consistent method for creating the field in the database?
    Not for users,no. It might work as described earlier in this thread but I can't vouch for it. The only way I would do it would be in code.
    Quote Originally Posted by stonesown
    2) Can you be specific about which files need to be edited for the new field to be functional in the edit and detail views? I realize you said the defaultview and editview files but is that all? And is that the html, php, or both? Anything you can say about the edits required?
    Both php and html have to be edited. Editview, detailview and maybe listview. I really cant tell you exactly how without knowing more about the field you are adding but it you look at the code that is already there it should be a pretty simple cut and paste job.
    Quote Originally Posted by stonesown
    I'm sorry if this is an amateurish question but I think this topic has had more than it's share of incomplete responses so it would be good for the record, and also, I'm smart enough to choose a great crm but not smart enough to complete this customization without help from the experts
    If you need more help than the above just let me know the specifics about what you are adding and I will go over it in more detail.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. custom field to sugar field
    By tanhaa in forum Developer Help
    Replies: 2
    Last Post: 2011-05-04, 03:52 PM
  2. Relate field doesn't work in Custom module
    By Mubi in forum Downloads
    Replies: 1
    Last Post: 2008-07-08, 11:59 AM
  3. Related field to custom module
    By Billwobo in forum Help
    Replies: 2
    Last Post: 2008-07-03, 12:05 PM
  4. Custom Field in Users Module
    By Nico.awc in forum Developer Help
    Replies: 2
    Last Post: 2008-05-08, 04:28 PM
  5. Custom field Leads Module
    By Heilong in forum Help
    Replies: 0
    Last Post: 2008-02-05, 09:32 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
  •