Explain like I've five: How do I show a field from the Leads module in the Tasks/Calls module listview?

I have been bashing my head against this for days. I’m not a developer at all and there is some fundamental knowledge and/or skills I am missing here.

What I want to do is, I believe, simple. I want take the “account_name” field (I use it for the Company Name) from the “Leads” module and display it in the “Tasks” and “Calls” modules, specifically in list view. At present, the “tasks” and “calls” modules only show the lead contact name—that is, the individual’s name and not the company name. I don’t always remember which lead contact is associated with which company and I frequently have to click to the “leads” module to see who is associated with which company. This is pointless clicking.

Here’s an illustration:

In the “Leads” module you have data such as: name, status, account name, phone, etc:

Here’s what I’d like to happen. I inserted a dummy field to illustrate.

The calls/tasks module simply fulls data from the Leads/account_name field like this:

The data exists in this field:

I want to re-emphasize, I need the [account_name] field from “Leads” to show up in listview of “Tasks” and “Calls”.

Hello Comms

I have been through the same sort of thing with Tasks

The issue I found was with the “Related To” dropdown

The easiest solution was to create a direct relationship between Accounts & Tasks (One to Many) (One Account has many Tasks)

Add the Account relationship field to the Edit/Detail/List & Quick Create views

This allows my users to “Relate” the Task to the lead or contact but also link it directly to the Account

There maybe other ways to solve this without the added relationship but this was the quick fix I used

Hope this helps

Thanks

1 Like

Hi Comms,

You cant do that because Account Name is just an ordinary data field in Leads! Its is not linked to the task in anyway, the two modules are seperate entities.

The relationship between leads and tasks is based on the Leads Name field. This can be displayed in the list view of tasks by going into studio and then tasks then listview and dragging the name field accross to the view.

If you really want to show the account name from leads in tasks you will have to create a custom field in tasks called account_name then use an after relationship add logichook to add the account name field from the lead to the task programmatically.

http://developer.sugarcrm.com/2010/11/24/howto-after-relationship-add-logic-hooks/

1 Like

Andy: I certainly appreciate your input but your suggestion is miles ahead of my skill level. I got to the part where it mentions “beans” and I’m lost. What’s a bean?

I’m sorry, do you mean In “tasks” or in “leads”? I’m dead serious when I said “explain like I’m five”. I’ve been using SuiteCRM for a week and I have no programming experience.

I hate to ask because I know everyone is busy, but can you step-by-step this for me? I’m lost as soon as I get to “add relationship”. I don’t understand what I’m trying to accomplish.

You really need to go read the SugarCRM manual (for CE) and watch some youtube videos that explain how it all works. Relationships are what link the modules together. For example there is a one to many relationship between Accounts and Contacts. This means every account can have many contacts linked to it. In the detail view of the Account you will see the main accounts data but below it there will be several Sub-panels one of which will be Contacts. If you go into one of the linked Contacts you will see it only has one field linking back to the Account. You also have many to many relationships where both modules have a sub-panel and one to one relationships.

If you go into the admin settings panel you will see a link called Studio, go into that and you will be able to add fields and relationships between modules.

Hi There

I created a relationship between Accounts & Tasks/Calls

I would advise you go to the admin panel > Studio > Accounts > Relationships > Add Relationship > One to Many with Tasks/Calls

Save

Then go to Studio > Calls/Tasks > Layouts > Edit View (You will see Accounts on the side) click & drag it into the Edit View (you can tick the box at the top to Sync Detail view so it is the same as your edit view)

Then go to Layouts > Quick create and click “Copy From Edit View” This will bring over the Edit view into Quick Create

I have found this video on Youtube which explains this for Sugar but the method is identical (go to the 3 min mark)

Hope this helps :slight_smile:

Thanks