+ Start a Discussion
The new LearnerThe new Learner 

How to Update events using batch class

Hi Experts,

I want to post a chatter on the event record on a daily basis when the event status-completed and When the Event Date is passed. Chatter should not update the same record in their next batch . Kindly help me out.
PriyaPriya (Salesforce Developers) 


This is really hard to follow. Can you please provide a little more description of it.
Also as per my understanding you can try the below approach.

suggesttion - Process buildet to post chatter 


The new LearnerThe new Learner
Hi Priya,

I need to post a chatter on event records on daily basis using batch class based on the below criteria.
1.  When the Event record is status completed.
2. When the Event Date is passed.

Again it should not query the records which already chatter is posted using our batch class.

PriyaPriya (Salesforce Developers) 

You can create one custom field of checkbox type. Its intial value will be false.

So in Process builder you can check if the checkbox is false and status is completed and date is passed, the do the action 

In action :-
 1. chatter post
 2. update the customr field (which you have created above) to true.
so that next time that record get filter out. 

Hope this information will help you. If yes then you can mark it as best answer. 


Priya Ranjan

The new LearnerThe new Learner
How can schedule it daily, for the records