Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Relate field for users? (like "Assiigned To")

  1. #1
    nfriedly is offline Member
    Join Date
    Feb 2008
    Posts
    9

    Default Relate field for users? (like "Assiigned To")

    I'm in Studio trying to add a field to the Contacts module for who the Appointment Setter is. All of the appointment setters are users in sugar, so I would like it to preform the same as the Assigned To field for selecting a user. The closest thing to this that I can find is the Relate field, but it doesn't seem to have an option for users.

    Any ideas on how I could do this?

    I'm on Sugar 5.0.0e

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Relate field for users? (like "Assiigned To")

    Try updating the ext2 column to "Users" for the corresponding record in fields_meta_data (assuming you added the field as "relate")
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    nfriedly is offline Member
    Join Date
    Feb 2008
    Posts
    9

    Default Re: Relate field for users? (like "Assiigned To")

    Hey, sorry for the delay, That got me part of the way there. If I click the Select button I get a list of all users and I can choose one.

    But, if I just start typing, the autocomplete only shows "No Mach" no matter what I type.
    And then, because of the autocomplete doesn't work, I can't save if I typed in the persons name. (But I can if I click Select and then click their name.)

    Any ideas here?

    Thanks for your help so far!

    here is the results of some further research:

    Code:
    the ajax post data by a working User field:
    data={"\u006d\u0065\u0074\u0068\u006f\u0064":"\u0067\u0065\u0074\u005f\u0075\u0073\u0065\u0072\u005f\u0061\u0072\u0072\u0061\u0079","\u0066\u0069\u0065\u006c\u0064\u005f\u006c\u0069\u0073\u0074":["\u0075\u0073\u0065\u0072\u005f\u006e\u0061\u006d\u0065","\u0069\u0064"],"\u0070\u006f\u0070\u0075\u006c\u0061\u0074\u0065\u005f\u006c\u0069\u0073\u0074":["\u0061\u0073\u0073\u0069\u0067\u006e\u0065\u0064\u005f\u0075\u0073\u0065\u0072\u005f\u006e\u0061\u006d\u0065","\u0061\u0073\u0073\u0069\u0067\u006e\u0065\u0064\u005f\u0075\u0073\u0065\u0072\u005f\u0069\u0064"],"\u0072\u0065\u0071\u0075\u0069\u0072\u0065\u0064\u005f\u006c\u0069\u0073\u0074":["\u0061\u0073\u0073\u0069\u0067\u006e\u0065\u0064\u005f\u0075\u0073\u0065\u0072\u005f\u0069\u0064"],"\u0063\u006f\u006e\u0064\u0069\u0074\u0069\u006f\u006e\u0073":[{"\u006e\u0061\u006d\u0065":"\u0075\u0073\u0065\u0072\u005f\u006e\u0061\u006d\u0065","\u006f\u0070":"\u006c\u0069\u006b\u0065\u005f\u0063\u0075\u0073\u0074\u006f\u006d","\u0065\u006e\u0064":"\u0025","\u0076\u0061\u006c\u0075\u0065":"\u0022\u005c\u0075\u0030\u0030\u0036\u0035\u0022"}],"\u006c\u0069\u006d\u0069\u0074":"\u0033\u0030","\u006e\u006f\u005f\u006d\u0061\u0074\u0063\u0068\u005f\u0074\u0065\u0078\u0074":"\u004e\u006f\u0020\u004d\u0061\u0074\u0063\u0068"}&module=Home&action=quicksearchQuery&to_pdf=1
    
    the ajax post data sent by a non-working Appointment Setter field:
    data={"\u006d\u0065\u0074\u0068\u006f\u0064":"\u0071\u0075\u0065\u0072\u0079","\u006d\u006f\u0064\u0075\u006c\u0065\u0073":["\u0041\u0063\u0063\u006f\u0075\u006e\u0074\u0073"],"\u0067\u0072\u006f\u0075\u0070":"\u006f\u0072","\u0066\u0069\u0065\u006c\u0064\u005f\u006c\u0069\u0073\u0074":["\u006e\u0061\u006d\u0065","\u0069\u0064"],"\u0070\u006f\u0070\u0075\u006c\u0061\u0074\u0065\u005f\u006c\u0069\u0073\u0074":["\u0061\u0070\u0070\u006f\u0069\u006e\u0074\u006d\u0065\u006e\u0074\u005f\u0073\u0065\u0074\u0074\u0065\u0072\u005f\u0063","\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u0069\u0064\u005f\u0063"],"\u0072\u0065\u0071\u0075\u0069\u0072\u0065\u0064\u005f\u006c\u0069\u0073\u0074":["\u0061\u0063\u0063\u006f\u0075\u006e\u0074\u005f\u0069\u0064\u005f\u0063"],"\u0063\u006f\u006e\u0064\u0069\u0074\u0069\u006f\u006e\u0073":[{"\u006e\u0061\u006d\u0065":"\u006e\u0061\u006d\u0065","\u006f\u0070":"\u006c\u0069\u006b\u0065\u005f\u0063\u0075\u0073\u0074\u006f\u006d","\u0065\u006e\u0064":"\u0025","\u0076\u0061\u006c\u0075\u0065":"\u0022\u005c\u0075\u0030\u0030\u0032\u0030\u005c\u0075\u0030\u0030\u0036\u0035\u0022"}],"\u006f\u0072\u0064\u0065\u0072":"\u006e\u0061\u006d\u0065","\u006c\u0069\u006d\u0069\u0074":"\u0033\u0030","\u006e\u006f\u005f\u006d\u0061\u0074\u0063\u0068\u005f\u0074\u0065\u0078\u0074":"\u004e\u006f\u0020\u004d\u0061\u0074\u0063\u0068"}&module=Home&action=quicksearchQuery&to_pdf=1
    
    the data object for the working User field:
    method = get_user_array
    field_list = user_name,id
    - 0 = user_name
    - 1 = id
    populate_list = assigned_user_name,assigned_user_id
    - 0 = assigned_user_name
    - 1 = assigned_user_id
    required_list = assigned_user_id
    - 0 = assigned_user_id
    conditions = [object Object]
    - 0 = [object Object]
    - - name = user_name
    - - op = like_custom
    - - end = %
    - - value = e
    limit = 30
    no_match_text = No Match
    
    the data object for the non-working Appointment Setter field:
    method = query
    modules = Accounts
    - 0 = Accounts
    group = or
    field_list = name,id
    - 0 = name
    - 1 = id
    populate_list = appointment_setter_c,account_id_c
    - 0 = appointment_setter_c
    - 1 = account_id_c
    required_list = account_id_c
    - 0 = account_id_c
    conditions = [object Object]
    - 0 = [object Object]
    - - name = name
    - - op = like_custom
    - - end = %
    - - value = " e"
    order = name
    limit = 30
    no_match_text = No Match
    I added quotes around the value=" e" in the broken one to show that there's a space in front of it.

    Also, the good one has "user_name" in the field list and in the conditions while the broken one has "name" in the same places. Think that's the problem?
    Last edited by nfriedly; 2008-06-11 at 11:24 PM.

  4. #4
    nfriedly is offline Member
    Join Date
    Feb 2008
    Posts
    9

    Default Re: Relate field for users? (like "Assiigned To")

    For anyone still looking, I think I may have found an answer:

    http://www.sugarcrm.com/wiki/index.p...users_dropdown

    I'll test and edit this post when I have time.

  5. #5
    eosterberg's Avatar
    eosterberg is offline Member
    Join Date
    Jul 2008
    Location
    Minneapolis Minnesota US
    Posts
    6

    Default Re: Relate field for users? (like "Assiigned To")

    Were you able to get this working in 5.0?
    I'm running Version 5.0.0f (Build 3338) and the link referenced didn't seem to work for me. I couldn't locate the files to patch.

  6. #6
    nfriedly is offline Member
    Join Date
    Feb 2008
    Posts
    9

    Default Re: Relate field for users? (like "Assiigned To")

    well, I got pulled off the project before I ever got to it. So no, I didn't get it working; but that was not due to technical reasons.

  7. #7
    jtan is offline Member
    Join Date
    Aug 2008
    Posts
    10

    Default Re: Relate field for users? (like "Assiigned To")

    Quote Originally Posted by nfriedly
    For anyone still looking, I think I may have found an answer:

    http://www.sugarcrm.com/wiki/index.p...users_dropdown

    I'll test and edit this post when I have time.
    it does not work with sugrcrm 5.0, think for sugarcrm 5.0, u can find in QuickSearch (include/QuickSearchDefaults.php)

  8. #8
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Relate field for users? (like "Assiigned To")

    In this Post, a pdf, describing how to do the job in 5.0.0 is referenced.
    http://www.sugarcrm.com/forums/showp...87&postcount=3
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  9. #9
    saradhinc is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    13

    Default Re: Relate field for users? (like "Assiigned To")

    I use Sugar 5.0 CE and I could create a field similar to Assigned to and the Ajax thing also works fine. You can do this from Studio itself and below are the steps:

    1. Go to Admin -> Drop Down editor (under Developer Tools)
    2. Find the dropdown with the name "record_type_display" and edit it.
    3. You will see that the "Users" entry is not there by default. Add the Item Name as "Users" and Display Label as "Users".
    4. Save it.
    5. Now you need to go to the Studio, select the module where you want to add to field.
    6. Select Fields and Add Field
    7. The data type will be "Relate", enter all the information asked and choose module as "Users".
    8. Save it.
    9. Add this field in the layouts you require and you are done.

  10. #10
    moonliver is offline Member
    Join Date
    Jan 2009
    Posts
    5

    Default Re: Relate field for users? (like "Assiigned To")

    This is not working for 5.2.0. It appears that after you select "relate" it shows a list of modules, which does not include Users.

    Anyone come up with a resolution to this?


    Quote Originally Posted by saradhinc View Post
    I use Sugar 5.0 CE and I could create a field similar to Assigned to and the Ajax thing also works fine. You can do this from Studio itself and below are the steps:

    1. Go to Admin -> Drop Down editor (under Developer Tools)
    2. Find the dropdown with the name "record_type_display" and edit it.
    3. You will see that the "Users" entry is not there by default. Add the Item Name as "Users" and Display Label as "Users".
    4. Save it.
    5. Now you need to go to the Studio, select the module where you want to add to field.
    6. Select Fields and Add Field
    7. The data type will be "Relate", enter all the information asked and choose module as "Users".
    8. Save it.
    9. Add this field in the layouts you require and you are done.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Relate field cursor error
    By dsmithies in forum Help
    Replies: 3
    Last Post: 2008-06-05, 04:49 PM
  2. Is it a bug? Change the type of a custom field
    By ToniFatec in forum Developer Help
    Replies: 0
    Last Post: 2008-05-06, 03:17 PM
  3. relate to a virtual field
    By user1000 in forum Developer Help
    Replies: 0
    Last Post: 2008-04-28, 06:30 AM
  4. Relate field and subpanel
    By ranthony in forum Help
    Replies: 8
    Last Post: 2008-02-19, 04:52 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
  •