Results 1 to 3 of 3

Thread: custom field automatically changes for all contacts per account

  1. #1
    tellusmore is offline Senior Member
    Join Date
    Jun 2009
    Location
    Pittsburgh
    Posts
    60

    Default custom field automatically changes for all contacts per account

    v5.2k

    I really have 2 issues but the more pressing first of course. I'm very new to sugar.

    What i'm trying to accomplish:
    I've created a custom field in Contacts which shares a dropdown value list with Accounts
    My goal is that that shared dropdown list would update both ways, to include all contacts associated with that account (and vice versa) upon it being changed.

    Basically if one contact elevates the status it'll just change across the board, but ONLY the contacts associated with the account.

    The other is for the life of me i can't get the Studio-contacts-layout-editview to do much of anything, I can swap one field out for another, but i can't add an additonal field, seems to be ok under accounts, you drag it box expands, save and deploy, under contacts not so much.

    I'm more concerned with the former.

    thanks a bunch

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: custom field automatically changes for all contacts per account

    This will take some technical expertise. What you'll need to do is create a before_save hook for both accounts and contacts. When an account is saved it will fire your hook that will check for the account custom field and update all contacts with that value. The other hook for contacts would check that contact custom field and set the account and all contacts associated to that account with that value. Searching the forums should find some examples of how to create a before_save logic hook.

  3. #3
    tellusmore is offline Senior Member
    Join Date
    Jun 2009
    Location
    Pittsburgh
    Posts
    60

    Default Re: custom field automatically changes for all contacts per account

    with a slightly better understanding of sugar and also what i'm trying to accomplish.

    All of my contacts are assigned to an account.
    All accounts have a custom field

    When creating a meeting I would like to add "contacts" by their account's custom field designation.

    It seems it's very close to the related to, however it's not.

    This seems seemingly an easy task. It is a database afterall, sql queries just aren't this complicated.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. filter the contacts by industry field by each account
    By osotron in forum General Discussion
    Replies: 1
    Last Post: 2012-02-07, 07:58 PM
  2. Contacts Account Name required field
    By marketadvantage in forum Developer Help
    Replies: 5
    Last Post: 2009-11-13, 10:06 PM
  3. Replies: 1
    Last Post: 2009-07-24, 12:26 PM
  4. Account field shown in Contacts detail/edit view
    By michaelmax in forum Developer Help
    Replies: 0
    Last Post: 2009-06-19, 06:25 PM
  5. Replies: 0
    Last Post: 2006-06-13, 08:44 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
  •