• Aneta
  • NEWBIE
  • 10 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 24
    Replies

I am new to Visualforce Email Templates so any help is greatly appreciated!  Thanks!

 

I have the following HTML email template that we currently use for our approval workflow from a custom object: Proposal__c

 

 

I would like to convert this template to a Visualforce email template because I need to add couple things to it:

1. List of attachments that are attached to the proposal record that is being approved - with a link to view the attachment or the attachment(s) embeded in the email itself

2. Proposal approval history if possible - we have multiple approval steps and it would be nice to include that info in the email

 

 

Can someone please help? Thank you in adance for your help!!!

 

Here's the current HTML email template:

Proposal Approval Request

Sales Rep: {!Proposal__c.Opportunity_Owner__c}

Expected Close Date: {!Proposal__c.Expected_Close_Date__c}

Pricing Type: {!Proposal__c.Pricing_Type__c}

Estimate Provider (SE/SA): {!Proposal__c.Estimate_Provider__c}

One Time Cost: {!Proposal__c.One_Time_Cost__c}

Annual Recurring Cost: {!Proposal__c.Minimum_Annual_Recurring_Price__c}

Minimum One Time Price: {!Proposal__c.Mimimum_One_Time_Price__c}

Commited Annual Reccuring Price: {!Proposal__c.Minimum_Annual_Recurring_Price__c}

Upsell Adoption & Usage Recurring Fees: {!Proposal__c.Upsell_Adoption_Usage_Recurring_Fees__c}

Submitted for Approval Date: {!Proposal__c.Submitted_for_Approval_Date__c}

Note to Approver: {!Proposal__c.Proposal_Comments__c}

___________________________________________________________________

 

To Approve/Reject the proposal please do one of the following steps:

1. Reply to this email with one of the following words in the first line of the email body. Optionally you can add comments in the second line.

    approve
    reject

OR

2. Click here to approve in Salesforce.

 

 

  • June 07, 2013
  • Like
  • 0

Hello,

I'm brand new to development and triggers and I'm seeking some help in modifying the below simple trigger.

This is a trigger on the Attachemnt object that checks to count the number of attachments. If more than one then it flags a checkbox Attachment_Added__c on a custom object - Proposal. It works fine, but i would like to change it so that when the attachment is deleted and there are no attachments under the Proposal object then the checkbox on the proposal get cleared. Can someone please help?

Thank you in advance!

 

My current trigger:

// Trigger to update the Attachment__c custom checkbox field in Custom Object(Custom_Obj__c) if it has any attachment.
trigger CountAttachments on Attachment (after insert) 
{          
List<Proposal__c> co = [select id, Attachment_Added__c from Proposal__c where id =: Trigger.New[0].ParentId];          
If(co.size()>0)          
{              
co[0].Attachment_Added__c = True;              
update co;          
} 
}

 

  • March 22, 2013
  • Like
  • 0
Hi - I am new to Apex programming and triggers and have a simple question.  We are tracking proposals which are a child to an opportunity.  We may have multiple revisions of a proposal - the most recent is the one we should be using. We have approval process set up on the proposal.
 
I have a custom field - "Proposal Status" on the Proposal (New, Pending, Approved, or Rejected  - updated through Approval Process field updates). I would like to copy the value from this field from the latest proposal to a correlating field on the Opportunity when the Proposal Status changes. Note: we can have multiple revisions of the same proposal and I want to use the latest one.
 
I've tried this with roll-up summaries and workflow rules but it doesn't work. Called SFDC support and told that I need a trigger to do this. Can you please help me? I already spent hours on this and I'm about to give up. Nothing seems to work. Please help! Thank you! :)
  • March 18, 2013
  • Like
  • 0

Hello,

I'm brand new to development and triggers and I'm seeking some help in modifying the below simple trigger.

This is a trigger on the Attachemnt object that checks to count the number of attachments. If more than one then it flags a checkbox Attachment_Added__c on a custom object - Proposal. It works fine, but i would like to change it so that when the attachment is deleted and there are no attachments under the Proposal object then the checkbox on the proposal get cleared. Can someone please help?

Thank you in advance!

 

My current trigger:

// Trigger to update the Attachment__c custom checkbox field in Custom Object(Custom_Obj__c) if it has any attachment.
trigger CountAttachments on Attachment (after insert) 
{          
List<Proposal__c> co = [select id, Attachment_Added__c from Proposal__c where id =: Trigger.New[0].ParentId];          
If(co.size()>0)          
{              
co[0].Attachment_Added__c = True;              
update co;          
} 
}

 

  • March 22, 2013
  • Like
  • 0
Hi - I am new to Apex programming and triggers and have a simple question.  We are tracking proposals which are a child to an opportunity.  We may have multiple revisions of a proposal - the most recent is the one we should be using. We have approval process set up on the proposal.
 
I have a custom field - "Proposal Status" on the Proposal (New, Pending, Approved, or Rejected  - updated through Approval Process field updates). I would like to copy the value from this field from the latest proposal to a correlating field on the Opportunity when the Proposal Status changes. Note: we can have multiple revisions of the same proposal and I want to use the latest one.
 
I've tried this with roll-up summaries and workflow rules but it doesn't work. Called SFDC support and told that I need a trigger to do this. Can you please help me? I already spent hours on this and I'm about to give up. Nothing seems to work. Please help! Thank you! :)
  • March 18, 2013
  • Like
  • 0