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

Thread: Mark Contacts as Private

  1. #1
    applematt84 is offline Junior Member
    Join Date
    Nov 2006
    Posts
    3

    Default Mark Contacts as Private

    okay... here's the dill-e-o... my client wants their Contacts module to allow them to mark a contact as private, and those private contacts to only be viewable by the owner of that contact. what is the best way to make this happen? is there a few simple edits that need to be made to the .php files, or does it require hand-tooling a bunch of stuff within the contacts module?

    any help would be appreciated.

    also, just for grins, here's my client's sugar instance specs:

    FreeBSD 4.8 STABLE
    SugarSuite-4.2.1b.zip
    Apache (ver: ??, this is on a hosted server by PAIR)
    PHP 4.3.10
    MySQL 4.1.15
    Last edited by applematt84; 2006-11-10 at 08:40 PM. Reason: wording and spelling

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

    Default Re: Mark Contacts as Private

    I take it that your client wants both private and public contacts. I do this modification alot (or at least I did until recently). It's pretty easy.

    1. Create a custom field called 'private' in the module Contacts. Make it a checkbox
    2. Add that field to your EditView Page and your DetailView Page
    3. edit the file Contact.php and look for a function called 'create_list_query'
    4. Add a SQL query to obey the private flag by adding the table to the SELECT clause and the field private_c to the WHERE clause


    That should be about it. If you need help making this happen just ask. Something like this SHOULD be simpler (and maybe someone out there has a better way to do it)
    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

  3. #3
    beuten is offline Sugar Community Member
    Join Date
    May 2006
    Location
    Berlin, Germany
    Posts
    151

    Default Re: Mark Contacts as Private

    That is one of the features in the Pro version. Via a Team field all aspects of Sugar can be set to specific users or groups of users.
    Chad (beuten)
    DAXTEN
    www.daxten.com

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

    Default Re: Mark Contacts as Private

    Quote Originally Posted by beuten
    That is one of the features in the Pro version. Via a Team field all aspects of Sugar can be set to specific users or groups of users.
    True, but I didnt know that the teams functionality would allow you to restrict down to a single user, just groups of users unless that group only had one person in it.
    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
    beuten is offline Sugar Community Member
    Join Date
    May 2006
    Location
    Berlin, Germany
    Posts
    151

    Default Re: Mark Contacts as Private

    Quote Originally Posted by kbrill
    True, but I didn't know that the teams functionality would allow you to restrict down to a single user, just groups of users unless that group only had one person in it.
    Yes, it does. We use it this way all the time.
    There are auto generated private teams for each user. In addition there is the auto generated General team. The most basic configuration is that all users are in the General Team and each user has a private team. If a contact is to be marked as private, then it is visible to that user only.
    Chad (beuten)
    DAXTEN
    www.daxten.com

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

    Default Re: Mark Contacts as Private

    Quote Originally Posted by beuten
    Yes, it does. We use it this way all the time.
    There are auto generated private teams for each user. In addition there is the auto generated General team. The most basic configuration is that all users are in the General Team and each user has a private team. If a contact is to be marked as private, then it is visible to that user only.
    TeamsOS is going to work this way as well so I guess, in a few days once it's out of alpha, that would be my suggestion to the original question (unless you move to the Pro or Ent versions)
    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
    applematt84 is offline Junior Member
    Join Date
    Nov 2006
    Posts
    3

    Default Re: Mark Contacts as Private

    thanks much!! i'll let you know if i need any additional help! :-)

  8. #8
    toyd is offline Member
    Join Date
    Jan 2007
    Posts
    6

    Default Re: Mark Contacts as Private

    Is there any chance somebody could post the actual PHP code that would need to be written to get this to work?

    "Add a SQL query to obey the private flag by adding the table to the SELECT clause and the field private_c to the WHERE clause"

    This is a really important function to us, and it would be most appreciated if somebody will help me out. Sorry, I don't have a grasp on PHP yet and I'm a bit confused on how the code would look.

    thanks very much-
    Troy

  9. #9
    mindea is offline Junior Member
    Join Date
    Apr 2007
    Location
    Chicago area
    Posts
    2

    Default Re: Mark Contacts as Private

    Quote Originally Posted by toyd
    Is there any chance somebody could post the actual PHP code that would need to be written to get this to work?

    "Add a SQL query to obey the private flag by adding the table to the SELECT clause and the field private_c to the WHERE clause"
    Troy, did you get this figured out? We need to do the same thing.

  10. #10
    scottt is offline Junior Member
    Join Date
    May 2007
    Posts
    1

    Default Re: Mark Contacts as Private

    Quote Originally Posted by toyd
    Is there any chance somebody could post the actual PHP code that would need to be written to get this to work?

    "Add a SQL query to obey the private flag by adding the table to the SELECT clause and the field private_c to the WHERE clause"

    This is a really important function to us, and it would be most appreciated if somebody will help me out. Sorry, I don't have a grasp on PHP yet and I'm a bit confused on how the code would look.

    thanks very much-
    Troy
    I would appreciate this too, I am a little bit confused!

    Thanks,
    Scott.

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)

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
  •