function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dev2014dev2014 

Apex trigger selecting email of specific accounts

Hi my client wants to implement an Apex  trigger selecting email of specific accounts on a specific date.  I would appreciate your direction to similar code reference. Below is the first steps of the business logic.


1.       Trigger starts When today date= end of quarter date  update accounts based on end of quarter date field (date type  field with  case based  date formula on the field defaults value)

2.       Automatically select  Account list view of "My_large_accounts" list  view 

3.       Automatically Select email contacts for those "My_large_account" accounts list

An input  link to similar apex trigger code case   I'm new to Apex development so  ideas on how to get things going on this case would be appreciated.
 
Thanks,

Sonam_SFDCSonam_SFDC
Hi,

I understand that you wish to update the Account list at every end of quarter.

Triggers can be triggered on DML operations which happen on Object records such as insert, update, delete and undelete but since your request is more specific to a particular date of the month rather than on each DM operation- I would suggest you to consider creating a scheduled APEX which can be triggered on a specific time : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm

The link provided has sample code which will help you implement your logic , pls correct me in case I haven't understood your requirement ..