Results 1 to 3 of 3

Thread: Leads history problem

  1. #1
    nrage is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    17

    Default Leads history problem

    My CRM version is 4.0.1d

    The emails related to Leads are not shown in History panel. Who knows why it happens?
    I looked in the emails_leads database table and I saw that the links between email_id and lead_id are present.
    Thereis a buch of records there (deleted=0 i checked that for both emails and emails_leads records) that are not displayed in the
    Leads History panel.

    Somebody help! I need to track down correspondence with customers.

  2. #2
    gosugar is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    108

    Default Re: Leads history problem

    I think you need to look at the vardef file for Leads. Make sure the below code is present and correct as posted below.

    'emails' =>
    array (
    'name' => 'emails',
    'type' => 'link',
    'relationship' => 'lead_emails',
    'source'=>'non-db',
    'vname'=>'LBL_EMAILS',
    ),

  3. #3
    nrage is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    17

    Default Re: Leads history problem

    I checked that and this code is correct.
    Something I've noticed recenly: emails are not displayed in leads history just for one user other users with the same roles and priveleges have some emails in their leads history (again not sure they have all that are supposed to be there).. I'm sure that this user wrote emails to leads using crm and I checked the records in the database for him.

    Hm..
    The query for showing leads email history is as follows:

    SELECT emails.id, emails.name, emails.status, ' 'contact_name, ' 'contact_id, ' 'contact_name_owner, ' 'contact_name_mod, emails.date_modified, emails.parent_id, emails.parent_type, ' 'filename, emails.assigned_user_id, 'emails'panel_name
    FROM emails
    WHERE (
    emails.parent_id = '82dcad5f-e226-cef6-a830-4463628b43f4'
    AND emails.parent_type = 'Leads'
    AND emails.deleted =0
    )
    AND emails.deleted =0
    While the query for contacts history with the same option looks like this:

    SELECT emails.id, emails.name, emails.status, ' 'contact_name, ' 'contact_id, ' 'contact_name_owner, ' 'contact_name_mod, emails.date_modified, emails.parent_id, emails.parent_type, ' 'filename, emails.assigned_user_id, 'emails'panel_name
    FROM emails
    INNER JOIN emails_contacts ON ( emails.id = emails_contacts.email_id
    AND emails_contacts.contact_id = '97bbe682-84f4-7424-67b5-44bfb480ac59' )
    WHERE (
    emails_contacts.deleted =0
    AND emails.deleted =0
    )
    AND emails.deleted =0
    It clearly shows that the emails_leads table is not used... What is it for then?? So the problem was caused by parent_id and parent_type not being set correctly in the email table. Now I just have to check why it happens...
    Last edited by nrage; 2006-07-23 at 11:33 AM.

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
  •