Results 1 to 4 of 4

Thread: Adding Account Name to Email Subject Line

  1. #1
    bcarson76 is offline Member
    Join Date
    Nov 2010
    Posts
    6

    Default Adding Account Name to Email Subject Line

    Hello Again,

    I have searched through the help section here and can not seem to find what I am looking for.

    RIght now, when we create a Case for a specific account, and assign it to the correct user, it will email the user like it should, with the subject line we provide. However, the support staff would like the subject line to also include account name. We have told the people that answer the phones to put the account name in the subject, but they do not always remember, and I wanted to eliminate the need for them to even have to remember.

    I am assuming I have to modify something in the SugarBeans.php file, but I can not quite figure out where.

    I am running CE Version 6.1.0 (Build 5389)

    Thanks.

  2. #2
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Adding Account Name to Email Subject Line

    Hello,

    I would suggest to use logic hook which will save your case's subject along with account name.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  3. #3
    bcarson76 is offline Member
    Join Date
    Nov 2010
    Posts
    6

    Default Re: Adding Account Name to Email Subject Line

    Thanks for the reply, but say I am not at all familiar with writing logic hooks, where then would I go to make the change?

  4. #4
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Adding Account Name to Email Subject Line

    Hello,

    Create logic_hooks.php under custom/modules/Cases/logic_hooks.php if not there.

    Add following piece of code in that.

    PHP Code:
     $hook_version 1
    $hook_array = Array();
    $hook_array['before_save'] = Array(); 
    $hook_array['before_save'][] = Array(2'Add Account Name''custom/modules/Cases/AddAccountName.php','cAddAccountName''fAddAccountName'); 
    Create a file custom/modules/Cases/AddAccountName.php and paste following code,

    PHP Code:
    class cAddAccountName
    {
        function 
    fAddAccountName($bean)
        {
            
    // Change the concatenation according to your need 
            
    if($bean->fetched_row['id'] == "")
                
    $bean->name $bean->name.":".$bean->account_name
        }

    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Email accessing SUBJECT LINE
    By wwhitman in forum Developer Help
    Replies: 0
    Last Post: 2009-11-13, 06:58 PM
  2. Email Template Subject line
    By tazzangl in forum Help
    Replies: 0
    Last Post: 2008-12-03, 09:17 PM
  3. Allow variables in the email subject line
    By Blastus in forum Feature Requests
    Replies: 0
    Last Post: 2008-04-02, 06:20 PM
  4. Customize default email subject line?
    By djnoah in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2007-03-16, 08:05 AM

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
  •