display fields from related record on Email Template

Hi, 

I'm wondering if this is possible in Sugar? I came from SFDC and had used this function for a lot of my email templates during my SFDC days. Going into Sugar, I wanted to know if it's possible to display fields from related records on email template. 

A good use case for this is I have a module connected to Contacts. When creating my email template, I'd like to use just the Contact's First Name on the email template instead of the Contact's full name.  In SFDC, I will simply do the following:

Job_Application__r.Contact__r.FirstName__c

Where "r" denotes pulling related fields and "c" is the actual field being pulled. This example means The main module is Job Application, pulling in fields from Related Module Contact and returning the value of FirstName__c.

Is it possible in Sugar?

Parents
  • Hi Niegel Leoncio,

    When discussing templates in Sugar, it is important to distinguish between email templates, worklfow templates, process templates, and campaign templates. Each of these templates have different use cases and subtly different capabilities.

    In an email template, which would be used when sending an email manually, the Contact first name variable can be entered using the buttons in the user interface. The variable is: $contact_first_name

    In your question, you mention a Job_Application module. How is the link to the Job_Application module relevant to your email? Is the email being manually sent to the email address in the Job_Application module? Or, is the template you have in mind for a workflow or advanced workflow automation?

  • Patrick,

    This template is a legacy workflow template since I needed to use related contact field's email to make as a recipient of the alert. I know a work around is by creating a new field and doing a related field value. However, If I need multiple field values referenced from that related module. It would be nice to have it available in the code level and not create multiple fields.

    Niegel

  • Hi Niegel Leoncio,

    The exact syntax will be specific to your module names and relationship names.

    In a stock instance, 7.11.0.0 Enterprise, I did the following:

    1. Navigate to Module Builder

    2. Create and deploy a custom module named ja_jobApplication (Applications)

    3. Create one new Application record with a Contact named Gill Hicks related in the Contacts field.

    4. Navigate to Studio > Contacts >Relationships

    5. Create and deploy a custom 1-to-many relationship between Contacts and Applications

    contacts < 1-to-many > ja_jobApplication

    6. Navigate to Workflow Management

    7. Create a new template in the Applications module

    8. Add this variable in the body of the template:

    {::future::ja_jobApplication::contacts_ja_jobapplication_1::first_name::}

    9. Create a new legacy workflow that sends this alert to a monitored inbox

    10. Navigate to the record in step 3 above and trigger the workflow

    The email arrives with the name "Gill" where the variable had been in the template.

    I hope this is helpful.

  • Thanks for the detailed instruction here.

    So does this mean from looking at this

    {::future::ja_jobApplication::contacts_ja_jobapplication_1::first_name::}

    that the format I'm looking to use is

    {::future::<Primary Module>::<Custom Relationship Module Name>::<field name>::}

     

    Niegel

Reply Children