Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Email -> Right click -> Relate not working properly

  1. #1
    kkanti is offline Junior Member
    Join Date
    Sep 2007
    Posts
    2

    Default Email -> Right click -> Relate not working properly

    Need help with Email relate feature...

    Version 5.2.0a

    Steps to reproduce

    1. Right click any email and select 'Relate'
    2. Relate the email to any account
    3. Check Account detail page in the 'History' subpanel for the related email

    Problem

    A blank email is associated with the Account (have attached a screenshot for reference)

    Expected Behavior

    Email relation should work the same way as it works during email compose

    Further, I'm also facing issues with email import as detailed in bug #21359 with error message, "Status : Import Failed because the message is already imported or deleted from server"

    Any help on either of the issues is much appreciated

    Thanks in advance
    Attached Images Attached Images  

  2. #2
    sgandhi is offline Sugar Team Member
    Join Date
    Aug 2007
    Posts
    217

    Default Re: Email -> Right click -> Relate not working properly

    with the latest 5.2.0 patch, I am not able to reproduce this issue. It works fine.

    -samir

  3. #3
    jeremyb is offline Member
    Join Date
    Mar 2009
    Posts
    7

    Default Re: Email -> Right click -> Relate not working properly

    I am getting the same behavior. When I relate an email I get nothing (see attached image001.jpg). Then when I click on the envelope I get a blank email (see attached image002.jpg).

    Please advise.

    Thank you!

    jeremyb
    Attached Images Attached Images   

  4. #4
    kkanti is offline Junior Member
    Join Date
    Sep 2007
    Posts
    2

    Default Re: Email -> Right click -> Relate not working properly

    I have tried using the latest build as well but no luck...this problem is occuring only when try to relate an existing email in the inbox....for new email compose, the relation feature works fine

    Since a blank email is getting attached as history, my guess is that something is going wrong while inserting values into DB...am looking into the same....however, any help in this regard is much appreciated.

  5. #5
    sgandhi is offline Sugar Team Member
    Join Date
    Aug 2007
    Posts
    217

    Default Re: Email -> Right click -> Relate not working properly

    Hi,
    In the Email.php, there is a function called saveEmailText which inserts or updates row in the database. Can you please check the query and post it ??

    -Samir

  6. #6
    jeremyb is offline Member
    Join Date
    Mar 2009
    Posts
    7

    Default Re: Email -> Right click -> Relate not working properly

    Good Afternoon Samir,

    Thank you for your reply. I am afraid I do not know how to "check the query" for posting.

    Please advise.

    Jeremy

  7. #7
    sgandhi is offline Sugar Team Member
    Join Date
    Aug 2007
    Posts
    217

    Default Re: Email -> Right click -> Relate not working properly

    In Emails.php, there is a function called saveEmailText. There is a line of code $this->db->query($q); Just before this line add one more line

    $GLOBALS['log']->fatal("Email Relate query is = " . $q);

    Then do the relate action again and goto sugarcrm.log file in the root directory (the directory where you installed sugar) and search for Email Relate query is and post this entire line.

    -Samir

  8. #8
    jeremyb is offline Member
    Join Date
    Mar 2009
    Posts
    7

    Default Re: Email -> Right click -> Relate not working properly

    Good Afternoon Samir,

    Thank you! Where is the Emails.php located?

    Jeremy

  9. #9
    sgandhi is offline Sugar Team Member
    Join Date
    Aug 2007
    Posts
    217

    Default Re: Email -> Right click -> Relate not working properly

    Its in modules/Emails/Email.php

    -Samir

  10. #10
    jeremyb is offline Member
    Join Date
    Mar 2009
    Posts
    7

    Default Re: Email -> Right click -> Relate not working properly

    I edited my email.php code to show:


    function linkEmailToAddress($id, $type) {
    // TODO: make this update?
    $q1 = "SELECT * FROM emails_email_addr_rel WHERE email_id = '{$this->id}' AND email_address_id = '{$id}' AND address_type = '{$type}' AND deleted = 0";
    $r1 = $this->db->query($q1);
    $a1 = $this->db->fetchByAssoc($r1);

    if(!empty($a1) && !empty($a1['id'])) {
    return $a1['id'];
    } else {
    $guid = create_guid();
    $q2 = "INSERT INTO emails_email_addr_rel VALUES('{$guid}', '{$this->id}', '{$type}', '{$id}', 0)";
    $GLOBALS['log']->fatal("Email Relate query is = " . $q);
    $r2 = $this->db->query($q2);
    }

    return $guid;
    }


    function saveEmailText() {
    $isOracle = ($this->db->dbType == "oci8") ? true : false;
    if ($isOracle) {

    I hope the GLOBALS line was put in the correct space.

    When I logged off Sugar and logged back in I saw this on the top of all pages::

    Warning: Please upgrade 5.2.0c : The latest version of SugarCRM is 5.2.0c. Please visit support.sugarcrm.com to acquire the latest version.

    When I went to sugarcrm.log there were not entries at all for today 03/18/09.

    Please advise.

    Jeremy

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Search Funtion not working properly
    By gzirpolo in forum Help
    Replies: 8
    Last Post: 2008-08-15, 04:27 PM
  2. Replies: 0
    Last Post: 2008-06-07, 06:14 PM
  3. Email address not populating properly
    By jpenn in forum Help
    Replies: 0
    Last Post: 2006-04-11, 02:31 AM
  4. click to dial not working.
    By Randyr in forum Help
    Replies: 0
    Last Post: 2006-01-02, 07:25 PM
  5. Search function not working properly
    By amoslmeditabcom693427 in forum Help
    Replies: 1
    Last Post: 2005-06-20, 12:14 PM

Tags for this Thread

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
  •