+ Start a Discussion
Laxmi Pandey 20Laxmi Pandey 20 

schedule a VF Template

Hi,

I want to create a vf template which will have collated opportunity/relatedobject information of a user.

It will be like

dear user.

your following opportunities and relatedobject__c are due. Please check their planned and approval dates.

Opportunity Object Table with 

Opportunitiy id, planned date, approval date


relatedobject__c  table with 

relatedobject__c id, planned date approval date

Regards,
Salesforce

The above template should be scheduled to send information everyday with the following condition..

All opportunities of a owner where planned date is less than today and approved date is missing

All relatedobjects of a owner where planned date is less than today and approved date is missing

Please guide...
ShirishaShirisha (Salesforce Developers) 
Hi Laxmi,

You can create custom VF page using the sample code:

https://success.salesforce.com/answers?id=90630000000CfPdAAK

Also,in order to send an email then you will have to create a workflow and based on the criteria we should fire the email using the above template

https://help.salesforce.com/articleView?id=customize_wfalerts.htm&type=5

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
 
Laxmi Pandey 20Laxmi Pandey 20
Hi Shirisha,

my recipient is user, and email is about opportunities and related object. can you tell me how will it display the opportunity records of a owner and then the related records(if they are also meeting the criteria) with that opportunity. In my understanding, the template that you suggested will work for only related records not for the master records.. a code example will help...

Also, workflow will not collated all records meeting the criteria and emails per records. I want one email for a user in a record with the list of all records meeting the criteria...