• Geetha28
  • NEWBIE
  • 5 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 6
    Replies
Have a requirement to mass upload photo for the users like chatter photo. Is there a way to do it ?

Thanks in Advance!
SFDC Developer.
Have a requirement to mass upload photo for the users like chatter photo. Is there a way to do it ?

Thanks in Advance!
SFDC Developer.
I'm new to this and was hoping that someone could help me build an apex test class for the following trigger:

trigger ConvertLeadtrigger on Lead (after insert) {
//Bulkified
   Integer Count =0;
    Database.LeadConvert[] leadCollectionArray = new Database.LeadConvert[trigger.new.size()] ;
    for(Lead Lea : trigger.new){
        if(Lea.Convert__c == 'Trigger'){
          Database.LeadConvert convLead = new database.LeadConvert();
          convLead .setLeadId(Lea.Id);
          convLead.setConvertedStatus('Closed - Converted');
          convLead.setAccountID('001E000000M5uGr');
          convLead .setDoNotCreateOpportunity(true);
          leadCollectionArray[count] = convLead ;
          count++;
         }
    }
    Database.LeadConvertResult[] LeaConvResults = Database.convertLead(leadCollectionArray,false); 
}

Hi,

 

 I would like to send a mail to  a contact when case is created.The Email contains list of cases related to account.

So i created workflow with condition(case status = new) and type is Email Alert.

 

It is working  fine when I send it from a Send Email button on a Contact detail. When trying from work flow,its sends the mail but doesn't populate any  values.

 

Code as below

<messaging:emailTemplate recipientType="Contact"  relatedToType="Account"
    subject="Case report for Account: {!relatedTo.name}">
<messaging:htmlEmailBody >
  
        <html>
            <body>
               <p>Dear {!recipient.name},</p>
               <p>Below is a list of cases related to the account: {!relatedTo.name}.</p>
         <table border="0" >
                 <tr >
                     <th>Action</th><th>Case Number</th><th>Subject</th><th>Creator Email</th><th>Status</th>
                  </tr>

                  <apex:repeat var="cx" value="{!relatedTo.Cases}">
       <tr>
           <td><a href="https://na1.salesforce.com/{!cx.id}">View</a> | 
           <a href="https://na1.salesforce.com/{!cx.id}/e">Edit</a></td>
           <td>{!cx.CaseNumber}</td>
           <td>{!cx.Subject}</td>
           <td>{!cx.Contact.email}</td>
           <td>{!cx.Status}</td>
       </tr>
    </apex:repeat>    
        </table>
    <p/>
    <center>
        <apex:outputLink value="http://www.salesforce.com">
        For more detailed information login to Salesforce.com
    </apex:outputLink>
</center>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 

Thanks for any help

 

 

 

 

 

  • January 12, 2010
  • Like
  • 0

My email template (below) works fine when using the "preview" function to populate the Recipient (WhoID) and RelatedTo (WhatID)  - but when a workflow rule triggers the emai lto be sent, it comes back blank as if it's not resolving the who or what correctly. .

Code:
<messaging:emailTemplate recipientType="Contact"
    relatedToType="Account"
    subject="Your website Access"
    replyTo="anaddress@us.com" >

    <messaging:htmlEmailBody >        
    <html>
        <body>
        <p>Hello {!recipient.name}--</p>
        <p>Here is a list of the website access you users currently have for account {!relatedTo.name}:</p>
    <apex:datatable cellpadding="5" var="cts" value="{!relatedTo.Contacts}">
        <apex:column value="{!cts.Name}" headerValue="Name"/>
        <apex:column value="{!cts.Seat_Holder__c}" headerValue="Website Program Access"/>
        <apex:column value="{!cts.Email}" headerValue="Email" />
        <apex:column value="{!cts.Phone}" headerValue="Phone" />
    </apex:datatable>
        </body>
    </html>
    </messaging:htmlEmailBody> 
</messaging:emailTemplate>



I created a simple workflow rule that's called whenever a contact is edited. The workflow rule uses an email alert. The email Alert uses this template. I've checked to make sure the email template is for Contact objects, and that the Recipient is specified as Email Field: Email.

I must be missing something obvious..... any ideas?




Message Edited by icemft1976 on 10-24-2008 09:28 AM