• Emily Jones 4
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi,

I want to send an email alert to task owner if they have any open task which due date is already passed.
I want to send it 1 day after due date and 1 week after due date.
Please suggest how I can achieve it because through workflow it is not achievable.

Regards
Emily
Hi,
I have created a Visual force email template related to opportunity. I want to show last 2 activities realted to opportunity in this email template.
I used <apex:repet rows="4" and it is showing 4 record but accending order. I want to show last activity first then second last activity.

here is my code:

<messaging:emailTemplate subject="Stage  change reminder" recipientType="User" relatedToType="Opportunity">
 <messaging:htmlEmailBody >
  <html>
    <body>
        <h1 style="font-size:100%">
        <p>Dear {!recipient.name},</p></h1>
      
        <p>FYI, appended below is a snapshot of the last few activities related to this opportunity:</p>
            <table border="3" style="width:100%">
             
                <tr>
                    <th>View Activity</th>
                    <th>ActivityDate</th>
                    <th>Subject</th>
                    <th>Status</th>
                </tr>
          
                <apex:repeat rows="2" var="cx" value="{!relatedTo.ActivityHistories}">
                <tr>
                    <td><a href = "https://ap2.salesforce.com/{!cx.id}">View</a></td>
                    <td>{!cx.ActivityDate}</td>
                    <td>{!cx.Subject}</td>
                    <td>{!cx.Status}</td>
                </tr>
                </apex:repeat>
            </table>
            
            <p> Thank You</p>
            <p> Salesforce Team </p>
           
    </body>

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

Plz help me to show only last 4 activities in decending order.
 
Hi,

I want to send an email alert to task owner if they have any open task which due date is already passed.
I want to send it 1 day after due date and 1 week after due date.
Please suggest how I can achieve it because through workflow it is not achievable.

Regards
Emily
Hi,
I have created a Visual force email template related to opportunity. I want to show last 2 activities realted to opportunity in this email template.
I used <apex:repet rows="4" and it is showing 4 record but accending order. I want to show last activity first then second last activity.

here is my code:

<messaging:emailTemplate subject="Stage  change reminder" recipientType="User" relatedToType="Opportunity">
 <messaging:htmlEmailBody >
  <html>
    <body>
        <h1 style="font-size:100%">
        <p>Dear {!recipient.name},</p></h1>
      
        <p>FYI, appended below is a snapshot of the last few activities related to this opportunity:</p>
            <table border="3" style="width:100%">
             
                <tr>
                    <th>View Activity</th>
                    <th>ActivityDate</th>
                    <th>Subject</th>
                    <th>Status</th>
                </tr>
          
                <apex:repeat rows="2" var="cx" value="{!relatedTo.ActivityHistories}">
                <tr>
                    <td><a href = "https://ap2.salesforce.com/{!cx.id}">View</a></td>
                    <td>{!cx.ActivityDate}</td>
                    <td>{!cx.Subject}</td>
                    <td>{!cx.Status}</td>
                </tr>
                </apex:repeat>
            </table>
            
            <p> Thank You</p>
            <p> Salesforce Team </p>
           
    </body>

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

Plz help me to show only last 4 activities in decending order.
 
Hi,
I have created a Visual force email template related to opportunity. I want to show last 2 activities realted to opportunity in this email template.
I used <apex:repet rows="4" and it is showing 4 record but accending order. I want to show last activity first then second last activity.

here is my code:

<messaging:emailTemplate subject="Stage  change reminder" recipientType="User" relatedToType="Opportunity">
 <messaging:htmlEmailBody >
  <html>
    <body>
        <h1 style="font-size:100%">
        <p>Dear {!recipient.name},</p></h1>
      
        <p>FYI, appended below is a snapshot of the last few activities related to this opportunity:</p>
            <table border="3" style="width:100%">
             
                <tr>
                    <th>View Activity</th>
                    <th>ActivityDate</th>
                    <th>Subject</th>
                    <th>Status</th>
                </tr>
          
                <apex:repeat rows="2" var="cx" value="{!relatedTo.ActivityHistories}">
                <tr>
                    <td><a href = "https://ap2.salesforce.com/{!cx.id}">View</a></td>
                    <td>{!cx.ActivityDate}</td>
                    <td>{!cx.Subject}</td>
                    <td>{!cx.Status}</td>
                </tr>
                </apex:repeat>
            </table>
            
            <p> Thank You</p>
            <p> Salesforce Team </p>
           
    </body>

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

Plz help me to show only last 4 activities in decending order.