Results 1 to 5 of 5

Thread: Additional Info Needed In Lead Notifications

  1. #1
    nhellwig is offline Senior Member
    Join Date
    Oct 2009
    Posts
    23

    Default Additional Info Needed In Lead Notifications

    I need to add the Account Name, City and State to the Lead assignment notifications that are generated by the SugarCRM system. I tried editing the en_us.notify_template.html as follows in an attempt to get this information to print:

    <!-- BEGIN: Lead_Subject -->
    SugarCRM Lead - {LEAD_NAME}
    <!-- END: Lead_Subject -->
    <!-- BEGIN: Lead -->
    {ASSIGNER} has assigned a Lead to {ASSIGNED_USER}.

    Name: {LEAD_NAME}
    Company: {LEAD_ACCOUNT_NAME}
    City: {LEAD_PRIMARY_ADDRESS_CITY}
    State: {LEAD_PRIMARY_ADDRESS_STATE}

    Lead Source: {LEAD_SOURCE}
    Status: {LEAD_STATUS}
    Description: {LEAD_DESCRIPTION}

    You may review this Lead at:
    {URL}
    <!-- END: Lead -->

    This resulted in the new field names appearing, but not the actual data. I've obviously misnamed the field variables. Does anyone know what I need to do to get this additional information to print? We are running SugarCRM Community Edition Version 5.2.0k

    Thanks

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Additional Info Needed In Lead Notifications

    You need to also modify create_notification_email() in SugarBean.php to assign the values to the new variables you added to the template.

    Note this is not upgrade-safe.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    nhellwig is offline Senior Member
    Join Date
    Oct 2009
    Posts
    23

    Default Re: Additional Info Needed In Lead Notifications

    I'm not that familiar with php. I looked at the SugarBean.php module and found the create_notification_email() section, but I don't see how to assign values to the new variables that I added to the template. Can you give me a little more guidance?

    Thanks,

    Neil

  4. #4
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Additional Info Needed In Lead Notifications

    Take a look at line 1730 and you'll see something like this:

    Code:
    $xtpl->assign("ASSIGNED_USER", $this->new_assigned_user_name);
    The basic syntax is that "ASSIGNED_USER" refers to the variable on your template (i.e. For example, {LEAD_PRIMARY_ADDRESS_CITY} from your modifications) and the section that begins with $this is the value that you want to assign to that variable.

    So, something like this should do the trick for you:

    Code:
    $xtpl->assign("LEAD_PRIMARY_ADDRESS_CITY", $this->primary_address_city);
    You'll probably want an IF statement in there as well to cause it to only happen for Leads.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  5. #5
    nhellwig is offline Senior Member
    Join Date
    Oct 2009
    Posts
    23

    Default Re: Additional Info Needed In Lead Notifications

    Angel,

    That worked like a charm! I'll keep my notes since I understand that any changes to SugarBean.php are not upgrade safe.

    Thanks for all the help!!

    Neil

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Basic info needed, please
    By deeziner in forum Help
    Replies: 4
    Last Post: 2010-03-18, 02:04 AM
  2. Replies: 1
    Last Post: 2009-11-02, 03:28 PM
  3. adding additional info next to the module name
    By sugarcare in forum Developer Help
    Replies: 1
    Last Post: 2009-03-04, 10:42 AM
  4. Problem with Saving Lead info with Lead Table vs Quick Lead Create Table
    By crmzepher in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2009-02-20, 05:30 AM
  5. Replies: 1
    Last Post: 2009-02-03, 11:45 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
  •