• Brian Sherman 22
  • NEWBIE
  • 10 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 26
    Replies
I need to put Social icons in the bottom of a Visualforce email template.  I have loaded these icons to our documents folder.  How do I embed a link so that when someone clicks on of these icons it redirects to our social accounts?  Also, can I put all icons beside each other on one row of the template?
HI there,

I have a visualforce email template that I would like to use Google fonts for.  My code looks like this:
 
<messaging:emailTemplate subject="{!if(RelatedTo.Site__r.State_Province__c='QC','Re: '& relatedTo.Site__r.Name_FR__c & ' ID:'& relatedTo.Name,'Your ' & relatedTo.Site__r.Name & ' Inquiry ID:' & relatedTo.Name)}" recipientType="Lead" relatedToType="Lead_To_Site_Association__c">
<messaging:htmlEmailBody >
    <html>
    <head><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:300,400,600,700&amp;lang=en" /></head>
            <body style="background-color:#ffffff;">
            <style>
            body{
            font-family: 'Raleway';}
            </style>

When I look at the template in the preview it appears fine.  When I send a test the email is received with Times New Roman and not the font I saw in the preview.

Any ideas?
I am getting an error when a process builder flow executes.

DECISION: myPreWaitDecision_myWait_myRule_8
Executed this outcome: myPreWaitRule_myWait_myRule_8
Outcome conditions: 1 AND 2 AND 5 AND 6 AND 7 AND (3 OR 4)
1. {!myVariable_current.Lead_Email__c} (test@test.com) Is null false
2. {!myVariable_current.Site__r.White_Glove_Property__c} (false) Equals false
3. {!myVariable_current.Site__r.Earliest_Suite_Availabe__c} (null) Greater than {!formula_9_myRule_8_Earliest_Suite_Availabe_c} (<formula_9_myRule_8_Earliest_Suite_Availabe_c couldn't be resolved>)
4. {!myVariable_current.Site__r.Earliest_Suite_Availabe__c} (null) Is null true
5. {!myVariable_current.Application__c} (<myVariable_current.Application__c couldn't be resolved>) Does not equal Application
6. {!myVariable_current.Site__r.Company_Code__c} (1000) Does not equal 2000
7. {!myVariable_current.Site__r.Company__c} (**recordID removed**) Is null false
Logic: Advanced Logic (1 AND 2 AND 5 AND 6 AND 7 AND (3 OR 4))

Does anyone know why the fields in question could not be resolved?
Hi there!

I have a VF email template that will populate all merge fields when I test from the template, but when workflow triggers the template, almost all merge fields are blank.

Here is the template:
 
<messaging:emailTemplate subject="{!if(RelatedTo.Site__r.State_Province__c='QC','Demande de location reçue – no de demande: ' & relatedTo.Name & ' ID: '& relatedTo.ID,'Viewing Requested: ' & 'Rental Inquiry: ' & relatedTo.Name & ' Inquiry ID: ' & relatedTo.ID)}" recipientType="Lead" relatedToType="Lead_To_Site_Association__c" replyTo="deleted for privacy">
<messaging:htmlEmailBody >
        <html>
            <body style="background-color:#ffffff;">
            <apex:image id="Logo" value="{!If(relatedTo.Site__r.Company__r.Name=="ACME", "testurl1","testurl2")}" />
            
             <apex:outputPanel rendered="{!CONTAINS(relatedTo.Site__r.State_Province__c,'QC')}" layout="block">
                <table style="width:100%;border-top:5px solid #872435;border-bottom:0px solid #872435; background-color:#ffffff; padding: 0px 10px;">
                    <tr><td> 
                    <p><strong>For English content scroll down.</strong></p>               
                    <p>French text,</p>
                 </td>
                </tr>
                <tr style="padding-top:20px;">
                 <td><strong>Nom</strong>: {!relatedTo.Lead__r.Name}</td>
                </tr>
                <tr>
                <td><strong>Courriel du client</strong>: {!relatedTo.Lead__r.Email}</td>
                </tr>
                 <tr>
                 <td><strong>Téléphone</strong>: {!relatedTo.Lead__r.Phone}</td>
                </tr>
                <tr style="padding-bottom:20px;">
                <td><strong>Date/heure</strong>: {!relatedTo.Viewing_Prefered_Date_Time_String__c}</td>
                 </tr>
                
                <tr>
                    <td>
                    <br></br>
                    Sincères salutations,
                    <br></br>
                    Service à la clientèle<br></br>
                    <br></br>         
                    </td></tr>
                </table>

            </apex:outputPanel>
            
            <table style="width:100%;border-top:5px solid #872435;border-bottom:5px solid #872435; background-color:#ffffff; padding: 0px 10px;">
                <tr>
                    <td>
                    <br></br>
                      <p>Hello,</p>
                      <p>{!relatedTo.Site__r.Name}. text removed</p> 
                      <p>The original email appears below.</p>
                    </td>
                </tr>
                <tr style="padding-top:20px;">
                 <td><strong>Name</strong>: {!relatedTo.Lead__r.Name}</td>
                </tr>
                <tr>
                <td><strong>Prospect Email</strong>: {!relatedTo.Lead__r.Email}</td>
                </tr>
                 <tr>
                 <td><strong>Phone Number</strong>: {!relatedTo.Lead__r.Phone}</td>
                </tr>
                <tr style="padding-bottom:20px;">
                <td><strong>Date/Time</strong>: {!relatedTo.Viewing_Prefered_Date_Time_String__c}</td>
                 </tr>
                
                <tr>
                    <td>
                    <br></br>
                    Regards,
                    <br></br>
                    Customer Care<br></br>
                    <br></br>
                    </td>
                </tr>
                        <p>
                        <p>Original Email Content:</p>
                        <p>{!relatedTo.Original_Email__c}</p>
                       </p> 

           </table>
           
               </body>
        </html>
    </messaging:htmlEmailBody>
    </messaging:emailTemplate>


The only fields that merge when sent from workflow are:

{!relatedTo.Viewing_Prefered_Date_Time_String__c}
{!relatedTo.Site__r.Name}

All other fields do not merge.  This template is being sent to a Lead and a Contact/Person Account.  Any ideas?

One of my text classes is failing, but only when I have a specific process builder flow active.  Email error is:

An error occurred at element myPreWaitDecision_myWait_myRule_8 (FlowDecision).
The flow failed to access the value for myVariable_current.Site__r.Company__r.Company_Code__c because it hasn't been set or assigned.


Flow Details
Flow Name: Rental_Inquiry_Autoresponse
Type: Workflow
Version: 1
Status: Active
Flow Interview Details
Interview Label: Rental_Inquiry_Autoresponse-1_Lead_To_Site_Association__c
Current User: Brian Sherman (0051a000000uXsZ)
Start time: 26/02/2016 12:17 PM
Duration: 0 seconds
How the Interview Started
Brian Sherman (0051a000000uXsZ) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = a0355000001UEm3AAG
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "26/02/2016 12:17 PM"
DECISION: myPreWaitDecision_myWait_myRule_10
ASSIGNMENT: myWaitAssignment_myWait_myRule_10
{!cancelWaits} Add myWait_myRule_10
Result
{!cancelWaits} = "[myWait_myRule_10]"

Here is the class:
 
@isTest
private class SL_Test_EmailParser
{
  @isTest
  static void itShould()
  {
    Suite_Type__c s = new Suite_Type__c();
    s.Name = '1 Bedroom';
    s.Synonyms__c = '1 Bedroom';

    insert s;

    Site__c site = new Site__c(Name = 'Default');
    insert site;

    Ad_Source__c a = new Ad_Source__c();
    a.Name = 'Test';
    a.Email_Domain__c = 'test.com';
    insert a;

    Eml_Parsing_Rules__c e = new Eml_Parsing_Rules__c();
    e.Synonyms__c = 'Building|Property|Ad Address';
    e.RI_Fld_API_Name__c = 'Site__c';
    e.Active_Rule__c = true;
    e.RecordTypeId = Schema.SObjectType.Eml_Parsing_Rules__c.getRecordTypeInfosByName().get('Generic Rule').getRecordTypeId();

    insert e;

    Eml_Parsing_Rules__c e2 = new Eml_Parsing_Rules__c();
    e2.Synonyms__c = 'Required Bedroom|Size|Bedrooms|Type';
    e2.RI_Fld_API_Name__c = 'Suite_Type__c';
    e2.Active_Rule__c = true;
    e2.RecordTypeId = Schema.SObjectType.Eml_Parsing_Rules__c.getRecordTypeInfosByName().get('Generic Rule').getRecordTypeId();

    insert e2;

    Eml_Parsing_Rules__c e3 = new Eml_Parsing_Rules__c();
    e3.Synonyms__c = 'Email|From|E-mail Address|Email Address';
    e3.Lead_Field_API_Name__c = 'Email';
    e3.Active_Rule__c = true;
    e3.Regex__c = '([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)';
    e3.RecordTypeId = Schema.SObjectType.Eml_Parsing_Rules__c.getRecordTypeInfosByName().get('Generic Rule').getRecordTypeId();

    insert e3;

    Eml_Parsing_Rules__c e4 = new Eml_Parsing_Rules__c();
    e4.RI_Fld_API_Name__c = 'Move_In_Date__c';
    e4.Active_Rule__c = true;
    e4.Domain__c = 'test.com';
    e4.DS_Regex__c = '(\\d{1,2})-(\\w{1,3})-(\\d{4})';
    e4.Date_Regex__c = '(\\d{1,2})-(\\w{1,3})-(\\d{4})';
    e4.Year_Group__c = '3';
    e4.Month_Group__c = '2';
    e4.Day_Group__c = '1';
    e4.RecordTypeId = Schema.SObjectType.Eml_Parsing_Rules__c.getRecordTypeInfosByName().get('Domain Specific Rule').getRecordTypeId();

    insert e4;

    Site__c s2 = new Site__c(Name='Test Site2');
    s2.GeoLocation__latitude__s = 000.000001;
    s2.GeoLocation__longitude__s = 000.000001;
    insert s2;

    Building__c b = new Building__c(Name = 'Test', Site__c=s2.Id);
    insert b;

    Id [] fixedSearchResults= new Id[1];
    fixedSearchResults[0] = s2.Id;
    Test.setFixedSearchResults(fixedSearchResults);

    Messaging.inboundEmail eml = new Messaging.inboundEmail();
    eml.fromAddress = 'test@test.com';
    eml.plainTextBody = 'Property-Test Site2\nType-1 Bedroom\nEmail-testname@testname.com\n02-Jan-2015';
    eml.toAddresses = new String[]{'test2@test2.com'};
    eml.fromName = 'Test Name';

    Messaging.InboundEnvelope env = new Messaging.InboundEnvelope();
    env.fromAddress = 'test@test.com';
    env.toAddress = 'test2@test2.com';

    SL_EmailParser emp = new SL_EmailParser();
    emp.handleInboundEmail(eml,env);

  }
}

Any ideas?  If I disable a process builder flow the test passes.
We have a VF page that displays one company logo in a certain condition, and another in all others.  Code is below:

<apex:image id="Logo" value="{!If(objLeadSite.Site__r.Company__r.Name=="XXXX", "https://c.na24.content.force.com/servlet/servlet.ImageServer?id=0151a000000nGvu&oid=00D1a000000XXXX","https://c.na24.content.force.com/servlet/servlet.ImageServer?id=0151a000000nGvy&oid=00D1a000000YYYY")}" />

Now, when I land on this page from a related record that should match the Company Name, instead I am presented the "else" image.

What am I missing?
We have the following  VF component that lists out unit availability for our company.  It returns results and switches out English text for French text in our autoresponse:

<apex:repeat value="{!lstRentals}" var="item">
<tr>
<td style="text-align:left;padding:5px;"> {!CASE(item.strSiteType,"Bachelor","1 1/2","Junior 1 Bedroom","2 1/2","1 Bedroom","3 1/2","2 Bedroom","4 1/2","3 Bedroom","5 1/2","4 Bedroom","6 1/2","Parking","stationnement","unknown")}</td> <td style="text-align:left;padding:5px;"> {!item.strRent} </td>
<td style="text-align:left;padding:5px;"> {!if(item.strAvailableDate='immediate','immédiatement',item.strAvailableDate)}</td>
</tr>
</apex:repeat>

This is working great, but I need to do the same in a slightly different component.  Currently that component does not translate, and looks like this:

<td style="text-align:left;padding:5px;"> {!n.result['Suite_Type__c']} </td>

I tried the version below without success, not surprisingly as I am a novice at this.

{!CASE(!n.result['Suite_Type__c'],"Bachelor","1 1/2","Junior 1 Bedroom","2 1/2","1 Bedroom","3 1/2","2 Bedroom","4 1/2","3 Bedroom","5 1/2","4 Bedroom","6 1/2","Parking","stationnement","unknown")}

Any ideas on how to map the {!n.result['Suite_Type__c']} so the text is modified as above?
HI there,

I have a visualforce email template that I would like to use Google fonts for.  My code looks like this:
 
<messaging:emailTemplate subject="{!if(RelatedTo.Site__r.State_Province__c='QC','Re: '& relatedTo.Site__r.Name_FR__c & ' ID:'& relatedTo.Name,'Your ' & relatedTo.Site__r.Name & ' Inquiry ID:' & relatedTo.Name)}" recipientType="Lead" relatedToType="Lead_To_Site_Association__c">
<messaging:htmlEmailBody >
    <html>
    <head><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:300,400,600,700&amp;lang=en" /></head>
            <body style="background-color:#ffffff;">
            <style>
            body{
            font-family: 'Raleway';}
            </style>

When I look at the template in the preview it appears fine.  When I send a test the email is received with Times New Roman and not the font I saw in the preview.

Any ideas?
I am getting an error when a process builder flow executes.

DECISION: myPreWaitDecision_myWait_myRule_8
Executed this outcome: myPreWaitRule_myWait_myRule_8
Outcome conditions: 1 AND 2 AND 5 AND 6 AND 7 AND (3 OR 4)
1. {!myVariable_current.Lead_Email__c} (test@test.com) Is null false
2. {!myVariable_current.Site__r.White_Glove_Property__c} (false) Equals false
3. {!myVariable_current.Site__r.Earliest_Suite_Availabe__c} (null) Greater than {!formula_9_myRule_8_Earliest_Suite_Availabe_c} (<formula_9_myRule_8_Earliest_Suite_Availabe_c couldn't be resolved>)
4. {!myVariable_current.Site__r.Earliest_Suite_Availabe__c} (null) Is null true
5. {!myVariable_current.Application__c} (<myVariable_current.Application__c couldn't be resolved>) Does not equal Application
6. {!myVariable_current.Site__r.Company_Code__c} (1000) Does not equal 2000
7. {!myVariable_current.Site__r.Company__c} (**recordID removed**) Is null false
Logic: Advanced Logic (1 AND 2 AND 5 AND 6 AND 7 AND (3 OR 4))

Does anyone know why the fields in question could not be resolved?
All the expected custom fields for the Campsite_Reservation__c object could not be found. can anyone help... im in trailhead taking a module
Hi there!

I have a VF email template that will populate all merge fields when I test from the template, but when workflow triggers the template, almost all merge fields are blank.

Here is the template:
 
<messaging:emailTemplate subject="{!if(RelatedTo.Site__r.State_Province__c='QC','Demande de location reçue – no de demande: ' & relatedTo.Name & ' ID: '& relatedTo.ID,'Viewing Requested: ' & 'Rental Inquiry: ' & relatedTo.Name & ' Inquiry ID: ' & relatedTo.ID)}" recipientType="Lead" relatedToType="Lead_To_Site_Association__c" replyTo="deleted for privacy">
<messaging:htmlEmailBody >
        <html>
            <body style="background-color:#ffffff;">
            <apex:image id="Logo" value="{!If(relatedTo.Site__r.Company__r.Name=="ACME", "testurl1","testurl2")}" />
            
             <apex:outputPanel rendered="{!CONTAINS(relatedTo.Site__r.State_Province__c,'QC')}" layout="block">
                <table style="width:100%;border-top:5px solid #872435;border-bottom:0px solid #872435; background-color:#ffffff; padding: 0px 10px;">
                    <tr><td> 
                    <p><strong>For English content scroll down.</strong></p>               
                    <p>French text,</p>
                 </td>
                </tr>
                <tr style="padding-top:20px;">
                 <td><strong>Nom</strong>: {!relatedTo.Lead__r.Name}</td>
                </tr>
                <tr>
                <td><strong>Courriel du client</strong>: {!relatedTo.Lead__r.Email}</td>
                </tr>
                 <tr>
                 <td><strong>Téléphone</strong>: {!relatedTo.Lead__r.Phone}</td>
                </tr>
                <tr style="padding-bottom:20px;">
                <td><strong>Date/heure</strong>: {!relatedTo.Viewing_Prefered_Date_Time_String__c}</td>
                 </tr>
                
                <tr>
                    <td>
                    <br></br>
                    Sincères salutations,
                    <br></br>
                    Service à la clientèle<br></br>
                    <br></br>         
                    </td></tr>
                </table>

            </apex:outputPanel>
            
            <table style="width:100%;border-top:5px solid #872435;border-bottom:5px solid #872435; background-color:#ffffff; padding: 0px 10px;">
                <tr>
                    <td>
                    <br></br>
                      <p>Hello,</p>
                      <p>{!relatedTo.Site__r.Name}. text removed</p> 
                      <p>The original email appears below.</p>
                    </td>
                </tr>
                <tr style="padding-top:20px;">
                 <td><strong>Name</strong>: {!relatedTo.Lead__r.Name}</td>
                </tr>
                <tr>
                <td><strong>Prospect Email</strong>: {!relatedTo.Lead__r.Email}</td>
                </tr>
                 <tr>
                 <td><strong>Phone Number</strong>: {!relatedTo.Lead__r.Phone}</td>
                </tr>
                <tr style="padding-bottom:20px;">
                <td><strong>Date/Time</strong>: {!relatedTo.Viewing_Prefered_Date_Time_String__c}</td>
                 </tr>
                
                <tr>
                    <td>
                    <br></br>
                    Regards,
                    <br></br>
                    Customer Care<br></br>
                    <br></br>
                    </td>
                </tr>
                        <p>
                        <p>Original Email Content:</p>
                        <p>{!relatedTo.Original_Email__c}</p>
                       </p> 

           </table>
           
               </body>
        </html>
    </messaging:htmlEmailBody>
    </messaging:emailTemplate>


The only fields that merge when sent from workflow are:

{!relatedTo.Viewing_Prefered_Date_Time_String__c}
{!relatedTo.Site__r.Name}

All other fields do not merge.  This template is being sent to a Lead and a Contact/Person Account.  Any ideas?

Hi, I've been trying to get this module to validate for the past few weeks and submitted feedback about it twice.

I keep getting the following error message: 

Step Not yet complete... here's what's wrong: 
The process actions are improperly configured because: it does not have an action named 'Update Contact Address', or it does not use the contact Mailing Street, or it does not use the account Billing Street. 
Note: you may run into errors if you've skipped previous steps.

I've had colleagues look over my work and nothing was found. 

I have tried naming the action "Update Contact Address" (as it says in the error message) and "Update Contact Addresses" (as in the exercise) and it just doesn't seem to matter at all.

User-added image

I didn't skip any steps and have the previous two sections validated.

Can I have some assistance, please?

Thanks in advance.

We have a VF page that displays one company logo in a certain condition, and another in all others.  Code is below:

<apex:image id="Logo" value="{!If(objLeadSite.Site__r.Company__r.Name=="XXXX", "https://c.na24.content.force.com/servlet/servlet.ImageServer?id=0151a000000nGvu&oid=00D1a000000XXXX","https://c.na24.content.force.com/servlet/servlet.ImageServer?id=0151a000000nGvy&oid=00D1a000000YYYY")}" />

Now, when I land on this page from a related record that should match the Company Name, instead I am presented the "else" image.

What am I missing?