Results 1 to 6 of 6

Thread: See users in notes list

  1. #1
    mikepalmer2403 is offline Junior Member
    Join Date
    Aug 2007
    Posts
    4

    Default See users in notes list

    Hi all,

    I want to be able to see the user who modified/created a note from the list view. When I add it in the Studio tool it shows as a long number instead of the user name???

    I'm sure this is something simple but cannot work it out myself.

    Thanks


    Mike

  2. #2
    datasponge is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    San Jose, CA, USA
    Posts
    553

    Default Re: See users in notes list

    Hi Mike,

    You need to define a relationhip in vardefs.php for the module where it is displayed so that it knows to use the field as a link to the other module table.

    Do a search for vardefs.php in the Forum. It only returns a handfull of threads and they have all the info on editting vardefs.

    Phil
    ========
    I probably made that more difficult than it should be. Did you use a relate field type? The modified_user_id field exists in my database, but it is not available in my list of fields for notes, so I'm not sure what you did to get there.

    Anyway, if you added it, it must be available to you in Studio. Make sure it is a relate field, not a text field. A relate field will show the user_name from the matching record in the related table. A text field will show the id (key) field.

    If the options are not available in Studio, THEN you'll need to look into vardefs.

    Phil
    Last edited by datasponge; 2008-03-28 at 11:34 PM. Reason: Bad Answer

  3. #3
    datasponge is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    San Jose, CA, USA
    Posts
    553

    Default Re: See users in notes list

    Let's make this even simpler.

    Under Notes Layouts in Studio edit the Listview and you will see two fields you can add that both have a label of "Modified By". Look at the field name at the bottom of the widget you drag into place and you will also see the field name.

    The one with the field name "modified_user_id" will show the id value (what you're seeing).

    The one with the field name "modified_user_name" will show the users name.


    I suspect you dragged "modified_user_id" into the List view.

    Phil

  4. #4
    mikepalmer2403 is offline Junior Member
    Join Date
    Aug 2007
    Posts
    4

    Default Re: See users in notes list

    Hi Phil,

    I dont have the "modified_user_name" in my list????

    Any idea why not

    Thanks

  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: See users in notes list

    Hi, mikepalmer2403

    You can add the non db field modified_user_name into custom vardefs of the Notes.

    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

  6. #6
    datasponge is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    San Jose, CA, USA
    Posts
    553

    Default Re: See users in notes list

    Now we're back to vardefs. On your server go to your SugarCRM home folder, then into the subfolder modules/Notes

    Edit the file vardefs.php Always make a backup of any file before you save any changes.

    I have not modified this file since my install (version 5.0.0b) and I have this field definition in the file. If you don't have it, find the similar field definition for 'modified_by_id' and insert these lines after it.

    PHP Code:
        'modified_by_name' =>
      array (
        
    'name' => 'modified_by_name',
        
    'vname' => 'LBL_MODIFIED_BY',
        
    'type' => 'relate',
        
    'reportable'=>false,
        
    'source'=>'non-db',
        
    'table' => 'users',
        
    'id_name' => 'modified_user_id',
        
    'module'=>'Users',
        
    'duplicate_merge'=>'disabled'
      
    ), 
    If you do have it, then there is something else going on.

    I only see the modified_by_name field in the Listview layout. I don't see it in the Details layout. I'm not sure why, but make sure your looking in the Listview for an apples to apples comparison to what I'm seeing.

    If you make changes to vardefs.php, make sure to clear the vardefs cache under Admin->Repair, otherwise you won't see the changes in the Admin screens.

    Phil

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Email management - Improvements in future releases
    By manoj in forum Feature Requests
    Replies: 102
    Last Post: 2009-11-17, 06:43 AM
  2. Replies: 4
    Last Post: 2009-10-28, 10:21 AM
  3. hiding users list
    By carlatpg in forum Feature Requests
    Replies: 0
    Last Post: 2008-02-07, 07:20 PM
  4. Replies: 5
    Last Post: 2007-12-17, 09:17 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
  •