Results 1 to 4 of 4

Thread: Retrieving/Displaying Account Name with the Account ID

  1. #1
    chad.hutchins is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Texas
    Posts
    141

    Default Retrieving/Displaying Account Name with the Account ID

    Hello all,

    I have created a custom module (ServiceDates), and I am having some problems with my list view. I have the field account_id in my ServiceDates table as a foreign key, but I need for the account_name to show up in the list view. If that isn't making sense, maybe the inserted image will help out.

    I know how to right the SQL to get the Account Name, but I don't know where in the code that belongs.

    Thanks,


  2. #2
    chad.hutchins is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Texas
    Posts
    141

    Default Re: Retrieving/Displaying Account Name with the Account ID

    To give a more specific question, if I could find where each ServiceDates object is instantiated before the list view is shown or where the query is to grab the list view for the module, I could simply get the account name from the accounts table using the account_id foreign key.

    I am new to Sugar, so I am still trying to wrap my head around its design model.

    Thanks again,

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

    Default Re: Retrieving/Displaying Account Name with the Account ID

    Chad,

    Check out the Contacts module. The exact same thing is done here. You'll see the account name in the list view. Check out Contacts.php, vardefs.php, metadata/lisview_defs.php, and field_array.php and look for all occurrences of account_name.

  4. #4
    chad.hutchins is offline Sugar Community Member
    Join Date
    May 2007
    Location
    Texas
    Posts
    141

    Default Re: Retrieving/Displaying Account Name with the Account ID

    Thank you for the response.

    I have went through all of the files and made the appropriate changes. I ran the repair routines where necessary, but I am still having issues. Nothing is showing up in my account name list view field.

    Any other ideas? What other information could I give you to help understand my situation?

    Thanks again,

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2006-08-28, 01:27 PM
  2. Showing Member Organizations of Account
    By Lennu in forum General Discussion
    Replies: 0
    Last Post: 2006-03-27, 12:31 PM
  3. Import contact on existing account
    By esolarc in forum Developer Help
    Replies: 1
    Last Post: 2006-03-22, 01:21 PM
  4. Automatically Link Lead to Account
    By cmarcus in forum Feature Requests
    Replies: 2
    Last Post: 2006-03-20, 02: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
  •